Skip to content

Commit

Permalink
rebase fix
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed May 18, 2018
2 parents d111f6b + 8fd2df9 commit 3e0df73
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/RestrictedPython/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,13 +1156,6 @@ def visit_ImportFrom(self, node):
"""Allow `import from` statements with restrictions.
See check_import_names.
<<<<<<< HEAD
=> 'from _a import x' is ok, because '_a' is not added to the scope.
"""
if not node.module == '__future__' and any(name.startswith('_') for name in node.module.split('.')): # NOQA: E501
self.error(node, 'module name starts "_", which is forbidden.')

=======
=> 'from _a import x' is security wise ok,
because '_a' is not added to the scope.
Expand All @@ -1173,7 +1166,6 @@ def visit_ImportFrom(self, node):
# self.error(node, 'module name starts "_", which is forbidden.')
self.warn(node, 'module name starts "_", which is deprecated and '
'will be forbidden in RestrictedPython 5.')
>>>>>>> Instead of forbidding underscore directly deprecate it for now
return self.check_import_names(node)

def visit_alias(self, node):
Expand Down

0 comments on commit 3e0df73

Please sign in to comment.