forked from VimPlug/jedi
Try to use yield from instead of yield, if possible
This commit is contained in:
@@ -482,10 +482,10 @@ def get_global_filters(context, until_position, origin_scope):
|
||||
from jedi.inference.value.function import BaseFunctionExecutionContext
|
||||
while context is not None:
|
||||
# Names in methods cannot be resolved within the class.
|
||||
for filter in context.get_filters(
|
||||
until_position=until_position,
|
||||
origin_scope=origin_scope):
|
||||
yield filter
|
||||
yield from context.get_filters(
|
||||
until_position=until_position,
|
||||
origin_scope=origin_scope
|
||||
)
|
||||
if isinstance(context, (BaseFunctionExecutionContext, ModuleContext)):
|
||||
# The position should be reset if the current scope is a function.
|
||||
until_position = None
|
||||
|
||||
Reference in New Issue
Block a user