summaryrefslogtreecommitdiff
path: root/astroid/interpreter/objectmodel.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2020-12-30 10:58:17 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2020-12-30 10:58:17 +0100
commita0d7601b6205a0c6167fdd73fc121e2acfb09856 (patch)
tree1e93111d2ba29a7389a692910937ae6562e7462f /astroid/interpreter/objectmodel.py
parent99d9c77cc276b1c5f5d76d91282d05b5df3a2c21 (diff)
downloadastroid-git-fix-crash-in-dunder-inference.tar.gz
Fix a bug for dunder methods inference of function objectsfix-crash-in-dunder-inference
Fixes #819
Diffstat (limited to 'astroid/interpreter/objectmodel.py')
-rw-r--r--astroid/interpreter/objectmodel.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/astroid/interpreter/objectmodel.py b/astroid/interpreter/objectmodel.py
index 3eca5722..ae48ac11 100644
--- a/astroid/interpreter/objectmodel.py
+++ b/astroid/interpreter/objectmodel.py
@@ -324,6 +324,7 @@ class FunctionModel(ObjectModel):
doc=func.doc,
lineno=func.lineno,
col_offset=func.col_offset,
+ parent=func.parent,
)
# pylint: disable=no-member
new_func.postinit(func.args, func.body, func.decorators, func.returns)