Skip to content

Commit

Permalink
Fix import tainting of the global namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Nov 8, 2023
1 parent 3796023 commit 08e38e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python_minifier/rename/bind_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def visit_AsyncFunctionDef(self, node):

def visit_alias(self, node):
if node.name == '*':
get_global_namespace(node).tainted = True
get_global_namespace(node.namespace).tainted = True

root_module = node.name.split('.')[0]

if root_module == 'timeit':
get_global_namespace(node).tainted = True
get_global_namespace(node.namespace).tainted = True

if node.asname is not None:
if node.asname not in node.namespace.nonlocal_names:
Expand Down

0 comments on commit 08e38e7

Please sign in to comment.