summaryrefslogtreecommitdiff
path: root/astroid/nodes/node_classes.py
diff options
context:
space:
mode:
authorTushar Sadhwani <86737547+tushar-deepsource@users.noreply.github.com>2021-12-29 20:53:33 +0530
committerGitHub <noreply@github.com>2021-12-29 16:23:33 +0100
commitaa4f5bed58dc6521a6c2c0927ca0e0da48fd5ea5 (patch)
treed9dbc2d0834d6209346ea2ee0736fbfab1336c83 /astroid/nodes/node_classes.py
parent7afd696520f70a46334adea6d39f7150379198f3 (diff)
downloadastroid-git-aa4f5bed58dc6521a6c2c0927ca0e0da48fd5ea5.tar.gz
Add future=True to frame calls (#1305)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Diffstat (limited to 'astroid/nodes/node_classes.py')
-rw-r--r--astroid/nodes/node_classes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py
index 4e33bb5d..0f196812 100644
--- a/astroid/nodes/node_classes.py
+++ b/astroid/nodes/node_classes.py
@@ -4815,9 +4815,9 @@ class NamedExpr(mixins.AssignTypeMixin, NodeNG):
raise ParentMissingError(target=self.parent)
if not self.parent.parent.parent:
raise ParentMissingError(target=self.parent.parent)
- return self.parent.parent.parent.frame()
+ return self.parent.parent.parent.frame(future=True)
- return self.parent.frame()
+ return self.parent.frame(future=True)
def scope(self) -> "LocalsDictNodeNG":
"""The first parent node defining a new scope.
@@ -4849,7 +4849,7 @@ class NamedExpr(mixins.AssignTypeMixin, NodeNG):
:param stmt: The statement that defines the given name.
"""
- self.frame().set_local(name, stmt)
+ self.frame(future=True).set_local(name, stmt)
class Unknown(mixins.AssignTypeMixin, NodeNG):