Move iterate logic to the context.
This commit is contained in:
1 parent
47c249957d
commit
8c0845cf0c
6 files changed
+44
-45
No files matched your search
@@ -120,10 +120,9 @@ def _paths_from_assignment(module_context, expr_stmt):
|
||||
except AssertionError:
|
||||
continue
|
||||
|
||||
from jedi.evaluate.iterable import py__iter__
|
||||
from jedi.evaluate.syntax_tree import is_string
|
||||
cn = ContextualizedNode(module_context.create_context(expr_stmt), expr_stmt)
|
||||
for lazy_context in py__iter__(module_context.evaluator, cn.infer(), cn):
|
||||
for lazy_context in cn.infer().iterate(cn):
|
||||
for context in lazy_context.infer():
|
||||
if is_string(context):
|
||||
yield context.obj
|
||||
|
||||
Reference in new issue
Block a user