Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Six's exec_ does not have globals/locals kwargs (#84)
Browse files Browse the repository at this point in the history
Despite what documentation says...
  • Loading branch information
happz committed Sep 2, 2019
1 parent 6a24c7c commit ba51ffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gluetool/pylint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def visit_assign(self, node):

# Fill it with the module data by executing the module AST node withing the context
# of our placeholder's namespace.
six.exec_(node.root().as_string(), globals=module.__dict__, locals=None)
six.exec_(node.root().as_string(), module.__dict__)

# Now "evaluate" options structure inside this module, assign it to chosen name...
six.exec_('__pylint_options = {}'.format(node.value.as_string()), globals=module.__dict__, locals=None)
six.exec_('__pylint_options = {}'.format(node.value.as_string()), module.__dict__)

# ... and now pull the evaluated, Python data structure, out of the module namespace.
executed_options = module.__dict__['__pylint_options']
Expand Down

0 comments on commit ba51ffa

Please sign in to comment.