Fix #1573 again; a tree_node can be None
This commit is contained in:
1 parent
6dbc5e783e
commit
be7a1346ec
1 file changed
+1
-1
@@ -586,7 +586,7 @@ def _complete_getattr(user_context, instance):
|
||||
)
|
||||
for func in functions:
|
||||
tree_node = func.tree_node
|
||||
if tree_node.type != 'funcdef':
|
||||
if tree_node is None or tree_node.type != 'funcdef':
|
||||
continue
|
||||
|
||||
for return_stmt in tree_node.iter_return_stmts():
|
||||
|
||||
Reference in new issue
Block a user