protect token_list -> _token_list
This commit is contained in:
1 parent
7de4b14461
commit
65ce609a3c
5 files changed
+20
-36
No files matched your search
@@ -364,7 +364,7 @@ def filter_private_variable(scope, call_scope, var_name):
|
||||
|
||||
def _evaluate_list_comprehension(lc, parent=None):
|
||||
input = lc.input
|
||||
nested_lc = lc.input.token_list[0]
|
||||
nested_lc = input.expression_list()[0]
|
||||
if isinstance(nested_lc, pr.ListComprehension):
|
||||
# is nested LC
|
||||
input = nested_lc.stmt
|
||||
|
||||
@@ -185,7 +185,7 @@ class NameFinder(object):
|
||||
types = []
|
||||
if stmt.is_global():
|
||||
# global keyword handling.
|
||||
for token_name in stmt.token_list[1:]:
|
||||
for token_name in stmt._token_list[1:]:
|
||||
if isinstance(token_name, pr.Name):
|
||||
return evaluator.find_types(stmt.parent, str(token_name))
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user