mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 08:50:41 +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:
@ -1,8 +1,8 @@
|
||||
alphabets = [chr(i) for i in range(32, 126)]
|
||||
gear_one = [i for i in range(len(alphabets))]
|
||||
gear_two = [i for i in range(len(alphabets))]
|
||||
gear_three = [i for i in range(len(alphabets))]
|
||||
reflector = [i for i in reversed(range(len(alphabets)))]
|
||||
gear_one = list(range(len(alphabets)))
|
||||
gear_two = list(range(len(alphabets)))
|
||||
gear_three = list(range(len(alphabets)))
|
||||
reflector = list(reversed(range(len(alphabets))))
|
||||
code = []
|
||||
gear_one_pos = gear_two_pos = gear_three_pos = 0
|
||||
|
||||
|
Reference in New Issue
Block a user