mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Add Flake8 comprehensions to pre-commit (#7235)
* ci(pre-commit): Add ``flake8-comprehensions`` to ``pre-commit`` (#7233) * refactor: Fix ``flake8-comprehensions`` errors * fix: Replace `map` with generator (#7233) * fix: Cast `range` objects to `list`
This commit is contained in:
@ -24,7 +24,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[list] = [list() for _ in range(RADIX)]
|
||||
buckets: 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