mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
Fix search_global for builtins
This commit is contained in:
@@ -519,5 +519,5 @@ def get_global_filters(evaluator, context, until_position, origin_scope):
|
|||||||
context = context.parent_context
|
context = context.parent_context
|
||||||
|
|
||||||
# Add builtins to the global scope.
|
# Add builtins to the global scope.
|
||||||
for filter in evaluator.builtins_module.get_filters(search_global=True):
|
for filter in evaluator.builtins_module.get_filters():
|
||||||
yield filter
|
yield filter
|
||||||
|
|||||||
@@ -256,8 +256,8 @@ class StubParserTreeFilter(ParserTreeFilter):
|
|||||||
result_names = []
|
result_names = []
|
||||||
for key_name, names in self._used_names.items():
|
for key_name, names in self._used_names.items():
|
||||||
found_names = self._convert_names(self._filter(names))
|
found_names = self._convert_names(self._filter(names))
|
||||||
result_names += found_names
|
|
||||||
if found_names:
|
if found_names:
|
||||||
|
result_names += found_names
|
||||||
used_stub_names.add(key_name)
|
used_stub_names.add(key_name)
|
||||||
|
|
||||||
for non_stub_filter in self._non_stub_filters:
|
for non_stub_filter in self._non_stub_filters:
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ class TestClass(object):
|
|||||||
# should not know any class functions!
|
# should not know any class functions!
|
||||||
#? []
|
#? []
|
||||||
values
|
values
|
||||||
|
#?
|
||||||
|
values
|
||||||
#? ['return']
|
#? ['return']
|
||||||
ret
|
ret
|
||||||
return a1
|
return a1
|
||||||
|
|||||||
Reference in New Issue
Block a user