Apply ruff flake8-comprehensions (#21694)
This commit is contained in:
@@ -34,7 +34,7 @@ empty_dict = object()
|
||||
def _match(qs, ks):
|
||||
"""Return True if regexes in qs match any window of strings in tuple ks."""
|
||||
# compile regexes and force complete match
|
||||
qts = tuple(map(lambda x: re.compile(x + "$"), qs))
|
||||
qts = tuple((re.compile(x + "$") for x in qs))
|
||||
for i in range(len(ks) - len(qs) + 1):
|
||||
matches = [x.match(y) for x, y in zip(qts, ks[i:])]
|
||||
if matches and all(matches):
|
||||
|
||||
Reference in New Issue
Block a user