mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-23 18:17:05 +08:00
Fix private variables in filters.
This commit is contained in:
1 parent
5c0b2d7aae
commit
129c669bc0
6 files changed
+72
-20
No files matched your search
@@ -123,7 +123,7 @@ class DictFilter(AbstractFilter):
|
||||
return self._filter(self._dct.values())
|
||||
|
||||
|
||||
def get_global_filters(evaluator, context, until_position):
|
||||
def get_global_filters(evaluator, context, until_position, origin_scope):
|
||||
"""
|
||||
Returns all filters in order of priority for name resolution.
|
||||
"""
|
||||
@@ -131,7 +131,10 @@ def get_global_filters(evaluator, context, until_position):
|
||||
while context is not None:
|
||||
if not (context.type == 'classdef' and in_func):
|
||||
# Names in methods cannot be resolved within the class.
|
||||
for filter in context.get_filters(search_global=True, until_position=until_position):
|
||||
for filter in context.get_filters(
|
||||
search_global=True,
|
||||
until_position=until_position,
|
||||
origin_scope=origin_scope):
|
||||
yield filter
|
||||
if context.type == 'funcdef':
|
||||
# The position should be reset if the current scope is a function.
|
||||
|
||||
Reference in new issue
Block a user