summaryrefslogtreecommitdiff
path: root/pylint/checkers/variables.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/variables.py')
-rw-r--r--pylint/checkers/variables.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 315698c58..40fc99b63 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -1817,7 +1817,7 @@ class VariablesChecker(BaseChecker):
"""
if (
node.frame().parent == defstmt
- and node.statement(future=True) not in node.frame().body
+ and node.statement(future=True) == node.frame()
):
# Check if used as type annotation
# Break but don't emit message if postponed evaluation is enabled