Skip to content

Commit ea3f99a

Browse files
committed
Use generator expression to avoid unnecessary temporary list
1 parent 662280e commit ea3f99a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sqlparse/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ def imt(token, i=None, m=None, t=None):
9595
return False
9696
elif clss and isinstance(token, clss):
9797
return True
98-
elif mpatterns and any((token.match(*pattern) for pattern in mpatterns)):
98+
elif mpatterns and any(token.match(*pattern) for pattern in mpatterns):
9999
return True
100-
elif types and any([token.ttype in ttype for ttype in types]):
100+
elif types and any(token.ttype in ttype for ttype in types):
101101
return True
102102
else:
103103
return False

0 commit comments

Comments
 (0)