diff options
author | Simon Hewitt <si@sjhewitt.co.uk> | 2020-12-04 11:00:21 -0800 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-12-24 14:12:18 +0100 |
commit | 922820e47595d1335fdafb571ff4e87f5970a22b (patch) | |
tree | c2df032265393e5aad35dbccc5e11977fd5d3c2b | |
parent | caa8a647a801c8170e61a7d80ea8e723289e6950 (diff) | |
download | astroid-git-922820e47595d1335fdafb571ff4e87f5970a22b.tar.gz |
Add None check on inferred_node
-rw-r--r-- | astroid/helpers.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py index a7764d7a..96e43de0 100644 --- a/astroid/helpers.py +++ b/astroid/helpers.py @@ -252,6 +252,7 @@ def object_len(node, context=None): if ( isinstance(node_frame, scoped_nodes.FunctionDef) and node_frame.name == "__len__" + and inferred_node is not None and inferred_node._proxied == node_frame.parent ): message = ( |