mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
Fix: 'NoneType' object has no attribute 'isinstance'
This commit is contained in:
@@ -318,7 +318,9 @@ def find_name(scope, name_str, position=None, search_global=False,
|
|||||||
exc = pr.Class, pr.Function
|
exc = pr.Class, pr.Function
|
||||||
until = lambda: par.parent.parent.get_parent_until(exc)
|
until = lambda: par.parent.parent.get_parent_until(exc)
|
||||||
|
|
||||||
if par.isinstance(pr.Flow):
|
if par is None:
|
||||||
|
pass
|
||||||
|
elif par.isinstance(pr.Flow):
|
||||||
if par.command == 'for':
|
if par.command == 'for':
|
||||||
result += handle_for_loops(par)
|
result += handle_for_loops(par)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user