clean of unnecessary checks, imports, calls (#7993)

This commit is contained in:
Mark Mayo
2022-11-21 00:00:27 +13:00
committed by GitHub
parent a25c53e8b0
commit f32d611689
27 changed files with 44 additions and 57 deletions

View File

@@ -84,7 +84,7 @@ class Automaton:
else:
current_state = next_state
for key in self.adlist[current_state]["output"]:
if not (key in result):
if key not in result:
result[key] = []
result[key].append(i - len(key) + 1)
return result