mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
[mypy]Correction of all errors in the sorts directory (#4224)
* [mypy] Add/fix type annotations for recursive_insertion_sort(#4085) * [mypy] Add/fix type annotations for bucket_sort(#4085) * [mypy] Reworked code for cocktail_shaker_sort so that missing return statement error is resolved(#4085) * [mypy] Add/fix type annotations for patience_sort(#4085) * [mypy] Add/fix type annotations for radix_sort(#4085) Co-authored-by: goodm2 <4qjpngu8mem8cz>
This commit is contained in:
@ -30,7 +30,7 @@ def radix_sort(list_of_ints: List[int]) -> List[int]:
|
||||
max_digit = max(list_of_ints)
|
||||
while placement <= max_digit:
|
||||
# declare and initialize empty buckets
|
||||
buckets = [list() for _ in range(RADIX)]
|
||||
buckets: List[list] = [list() for _ in range(RADIX)]
|
||||
# split list_of_ints between the buckets
|
||||
for i in list_of_ints:
|
||||
tmp = int((i / placement) % RADIX)
|
||||
|
Reference in New Issue
Block a user