mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Get rid of Function's get_magic_function_X, they are not used anymore.
This commit is contained in:
@@ -249,14 +249,12 @@ class Script(object):
|
|||||||
completions = []
|
completions = []
|
||||||
debug.dbg('possible completion scopes: %s', scopes)
|
debug.dbg('possible completion scopes: %s', scopes)
|
||||||
for s in scopes:
|
for s in scopes:
|
||||||
if s.isinstance(er.Function):
|
names = []
|
||||||
names = s.get_magic_function_names()
|
for names_dict in s.names_dicts(search_global=False):
|
||||||
else:
|
names += chain.from_iterable(names_dict.values())
|
||||||
names = []
|
|
||||||
for names_dict in s.names_dicts(search_global=False):
|
names = filter_definition_names(names, self._parser.user_stmt())
|
||||||
names += chain.from_iterable(names_dict.values())
|
|
||||||
|
|
||||||
names = filter_definition_names(names, self._parser.user_stmt())
|
|
||||||
for c in names:
|
for c in names:
|
||||||
completions.append((c, s))
|
completions.append((c, s))
|
||||||
return completions
|
return completions
|
||||||
|
|||||||
@@ -575,12 +575,6 @@ class Function(use_metaclass(CachedMetaClass, Wrapper)):
|
|||||||
for names_dict in compiled.magic_function_class.names_dicts(False):
|
for names_dict in compiled.magic_function_class.names_dicts(False):
|
||||||
yield names_dict
|
yield names_dict
|
||||||
|
|
||||||
def get_magic_function_names(self):
|
|
||||||
return compiled.magic_function_class.get_defined_names()
|
|
||||||
|
|
||||||
def get_magic_function_scope(self):
|
|
||||||
return compiled.magic_function_class
|
|
||||||
|
|
||||||
@Python3Method
|
@Python3Method
|
||||||
def py__call__(self, evaluator, params):
|
def py__call__(self, evaluator, params):
|
||||||
if self.base.is_generator():
|
if self.base.is_generator():
|
||||||
|
|||||||
Reference in New Issue
Block a user