Avoid the need to import search_ancestor
This commit is contained in:
1 parent
4a7b5f4879
commit
3ac1632a5c
13 files changed
+28
-44
No files matched your search
@@ -15,7 +15,6 @@ Unfortunately every other thing is being ignored (e.g. a == '' would be easy to
|
||||
check for -> a is a string). There's big potential in these checks.
|
||||
"""
|
||||
|
||||
from parso.tree import search_ancestor
|
||||
from parso.python.tree import Name
|
||||
|
||||
from jedi import settings
|
||||
@@ -76,7 +75,7 @@ def check_flow_information(value, flow, search_name, pos):
|
||||
])
|
||||
|
||||
for name in names:
|
||||
ass = search_ancestor(name, 'assert_stmt')
|
||||
ass = name.search_ancestor('assert_stmt')
|
||||
if ass is not None:
|
||||
result = _check_isinstance_type(value, ass.assertion, search_name)
|
||||
if result is not None:
|
||||
|
||||
Reference in new issue
Block a user