Skip to content

Commit

Permalink
code simplification as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed May 17, 2018
1 parent d932b85 commit 21d16a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RestrictedPython/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def check_import_names(self, node):
"""
if (isinstance(node, ast.ImportFrom)
and not node.module == '__future__'
and any([name.startswith('_') for name in node.module.split('.')])): # NOQA: E501
and any(name.startswith('_') for name in node.module.split('.'))): # NOQA: E501
self.error(node, 'module name starts "_", which is forbidden.')

for name in node.names:
Expand Down

0 comments on commit 21d16a8

Please sign in to comment.