diff options
| author | Tushar Sadhwani <86737547+tushar-deepsource@users.noreply.github.com> | 2021-12-29 20:53:33 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-29 16:23:33 +0100 |
| commit | aa4f5bed58dc6521a6c2c0927ca0e0da48fd5ea5 (patch) | |
| tree | d9dbc2d0834d6209346ea2ee0736fbfab1336c83 /astroid/builder.py | |
| parent | 7afd696520f70a46334adea6d39f7150379198f3 (diff) | |
| download | astroid-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/builder.py')
| -rw-r--r-- | astroid/builder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astroid/builder.py b/astroid/builder.py index ea9d7dc8..150eeed8 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -234,7 +234,7 @@ class AstroidBuilder(raw_building.InspectBuilder): This adds name to locals and handle members definition. """ try: - frame = node.frame() + frame = node.frame(future=True) for inferred in node.expr.infer(): if inferred is util.Uninferable: continue @@ -263,7 +263,7 @@ class AstroidBuilder(raw_building.InspectBuilder): if ( frame.name == "__init__" and values - and values[0].frame().name != "__init__" + and values[0].frame(future=True).name != "__init__" ): values.insert(0, node) else: |
