diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-07 13:56:46 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-15 21:14:28 +0100 |
commit | 44764d07cf5b16d248b992a031499d9026312f45 (patch) | |
tree | 2a2226b19a317c1ba61718ca579893e559bedaf1 | |
parent | dcb0e5749ce5ac0fcdd6614508784d16490e5080 (diff) | |
download | pylint-git-44764d07cf5b16d248b992a031499d9026312f45.tar.gz |
Fix E714 test for object identity should be 'is not'
-rw-r--r-- | pylint/checkers/variables.py | 4 |
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 |