mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 14:59:41 +08:00
Fix goto.
This commit is contained in:
@@ -102,7 +102,7 @@ class Evaluator(object):
|
|||||||
f = finder.NameFinder(self, scope, name_str, position)
|
f = finder.NameFinder(self, scope, name_str, position)
|
||||||
scopes = f.scopes(search_global)
|
scopes = f.scopes(search_global)
|
||||||
if is_goto:
|
if is_goto:
|
||||||
return f.filter_name(scopes)
|
return f.filter_name(scopes, search_global)
|
||||||
return f.find(scopes, search_global)
|
return f.find(scopes, search_global)
|
||||||
|
|
||||||
@memoize_default(default=[], evaluator_is_first_arg=True)
|
@memoize_default(default=[], evaluator_is_first_arg=True)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class NameFinder(object):
|
|||||||
search_str = str(self.name_str)
|
search_str = str(self.name_str)
|
||||||
try:
|
try:
|
||||||
names = names_dict[search_str]
|
names = names_dict[search_str]
|
||||||
if not names: # There must be something in there otherwise stop.
|
if not names: # We want names, otherwise stop.
|
||||||
return []
|
return []
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user