Fix one array usage.

This commit is contained in:
Dave Halter
2016-10-24 09:58:40 +02:00
parent 5b1d62a11e
commit 64b6396d19
5 changed files with 32 additions and 23 deletions
+2 -1
View File
@@ -192,6 +192,7 @@ def get_global_filters(evaluator, context, until_position, origin_scope):
"""
Returns all filters in order of priority for name resolution.
"""
from jedi.evaluate.representation import FunctionExecutionContext
in_func = False
while context is not None:
if not (context.type == 'classdef' and in_func):
@@ -201,7 +202,7 @@ def get_global_filters(evaluator, context, until_position, origin_scope):
until_position=until_position,
origin_scope=origin_scope):
yield filter
if context.type == 'funcdef':
if isinstance(context, FunctionExecutionContext):
# The position should be reset if the current scope is a function.
until_position = None
in_func = True