mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 17:08:49 +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:
@@ -70,9 +70,7 @@ class Automaton:
|
||||
>>> A.search_in("whatever, err ... , wherever")
|
||||
{'what': [0], 'hat': [1], 'ver': [5, 25], 'er': [6, 10, 22, 26]}
|
||||
"""
|
||||
result: dict = (
|
||||
dict()
|
||||
) # returns a dict with keywords and list of its occurrences
|
||||
result: dict = {} # returns a dict with keywords and list of its occurrences
|
||||
current_state = 0
|
||||
for i in range(len(string)):
|
||||
while (
|
||||
|
||||
Reference in New Issue
Block a user