diff --git a/sorts/bogo_sort.py b/sorts/bogo_sort.py index 70785140ee5c..d4b88ac26508 100644 --- a/sorts/bogo_sort.py +++ b/sorts/bogo_sort.py @@ -16,7 +16,7 @@ import random -def bogo_sort(collection: list) -> list: +def bogo_sort(collection: list[int]) -> list[int]: """Pure implementation of the bogosort algorithm in Python :param collection: some mutable ordered collection with heterogeneous comparable items inside @@ -30,7 +30,7 @@ def bogo_sort(collection: list) -> list: [-45, -5, -2] """ - def is_sorted(collection: list) -> bool: + def is_sorted(collection: list[int]) -> bool: for i in range(len(collection) - 1): if collection[i] > collection[i + 1]: return False diff --git a/sorts/unknown_sort.py b/sorts/unknown_sort.py index 9fa9d22fb5e0..0d792169fa27 100644 --- a/sorts/unknown_sort.py +++ b/sorts/unknown_sort.py @@ -6,7 +6,7 @@ """ -def merge_sort(collection): +def merge_sort(collection: list[int]) -> list[int]: """Pure implementation of the fastest merge sort algorithm in Python :param collection: some mutable ordered collection with heterogeneous