summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-07 13:56:46 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-15 21:14:28 +0100
commit44764d07cf5b16d248b992a031499d9026312f45 (patch)
tree2a2226b19a317c1ba61718ca579893e559bedaf1
parentdcb0e5749ce5ac0fcdd6614508784d16490e5080 (diff)
downloadpylint-git-44764d07cf5b16d248b992a031499d9026312f45.tar.gz
Fix E714 test for object identity should be 'is not'
-rw-r--r--pylint/checkers/variables.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 5c3380c9d..e9e8a22e3 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -1283,12 +1283,12 @@ class VariablesChecker(BaseChecker):
while parent is not None:
if parent is frame:
return False
- if isinstance(parent, astroid.Lambda) and not child is parent.args:
+ if isinstance(parent, astroid.Lambda) and child is not parent.args:
# Body of lambda should not have access to class attributes.
return True
if (
isinstance(parent, astroid.node_classes.Comprehension)
- and not child is parent.iter
+ and child is not parent.iter
):
# Only iter of list/set/dict/generator comprehension should have access.
return True