mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-25 09:48:36 +08:00
We don't need set_global_names, just set the attribute directly.
This commit is contained in:
@@ -141,7 +141,7 @@ class Parser(object):
|
|||||||
self.remove_last_newline()
|
self.remove_last_newline()
|
||||||
self.module.used_names = self.used_names
|
self.module.used_names = self.used_names
|
||||||
self.module.path = module_path
|
self.module.path = module_path
|
||||||
self.module.set_global_names(self.global_names)
|
self.module.global_names = self.global_names
|
||||||
self.module.error_statement_stacks = self.error_statement_stacks
|
self.module.error_statement_stacks = self.error_statement_stacks
|
||||||
self.grammar_symbols = grammar.number2symbol
|
self.grammar_symbols = grammar.number2symbol
|
||||||
|
|
||||||
|
|||||||
@@ -630,17 +630,6 @@ class SubModule(Scope, Module):
|
|||||||
self.path = None # Set later.
|
self.path = None # Set later.
|
||||||
# this may be changed depending on fast_parser
|
# this may be changed depending on fast_parser
|
||||||
|
|
||||||
def set_global_names(self, names):
|
|
||||||
"""
|
|
||||||
Global means in these context a function (subscope) which has a global
|
|
||||||
statement.
|
|
||||||
This is only relevant for the top scope.
|
|
||||||
|
|
||||||
:param names: names of the global.
|
|
||||||
:type names: list of Name
|
|
||||||
"""
|
|
||||||
self.global_names = names
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@cache.underscore_memoization
|
@cache.underscore_memoization
|
||||||
def name(self):
|
def name(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user