Skip to content

Commit cf623a7

Browse files
michael-katodorov
authored andcommitted
Pass generator instead of list to any()
1 parent 915a1ab commit cf623a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylint_django/augmentations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def ignore_import_warnings_for_related_fields(orig_method, self, node):
311311
iterat = consumer.to_consume.items if PY3 else consumer.to_consume.iteritems
312312
for name, stmts in iterat():
313313
if isinstance(stmts[0], ImportFrom):
314-
if any([n[0] in ('ForeignKey', 'OneToOneField') for n in stmts[0].names]):
314+
if any(n[0] in ('ForeignKey', 'OneToOneField') for n in stmts[0].names):
315315
continue
316316
new_things[name] = stmts
317317

0 commit comments

Comments
 (0)