mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +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
|
||||
|
||||
# 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
|
||||
|
||||
@@ -256,8 +256,8 @@ class StubParserTreeFilter(ParserTreeFilter):
|
||||
result_names = []
|
||||
for key_name, names in self._used_names.items():
|
||||
found_names = self._convert_names(self._filter(names))
|
||||
result_names += found_names
|
||||
if found_names:
|
||||
result_names += found_names
|
||||
used_stub_names.add(key_name)
|
||||
|
||||
for non_stub_filter in self._non_stub_filters:
|
||||
|
||||
@@ -57,6 +57,8 @@ class TestClass(object):
|
||||
# should not know any class functions!
|
||||
#? []
|
||||
values
|
||||
#?
|
||||
values
|
||||
#? ['return']
|
||||
ret
|
||||
return a1
|
||||
|
||||
Reference in New Issue
Block a user