mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
Fix #1573 again; a tree_node can be None
This commit is contained in:
@@ -586,7 +586,7 @@ def _complete_getattr(user_context, instance):
|
|||||||
)
|
)
|
||||||
for func in functions:
|
for func in functions:
|
||||||
tree_node = func.tree_node
|
tree_node = func.tree_node
|
||||||
if tree_node.type != 'funcdef':
|
if tree_node is None or tree_node.type != 'funcdef':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for return_stmt in tree_node.iter_return_stmts():
|
for return_stmt in tree_node.iter_return_stmts():
|
||||||
|
|||||||
Reference in New Issue
Block a user