Skip to content

Commit

Permalink
pylint: enable unnecessary-not check
Browse files Browse the repository at this point in the history
This finds things like
```python
if not x == 1:
```
which should be
```python
if x != 1:
```
  • Loading branch information
dcbaker authored and eli-schwartz committed Aug 31, 2021
1 parent 9e61b4f commit 1fc3d86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enable=
abstract-class-instantiated,
assert-on-tuple,
bad-indentation,
bare-except,
compare-to-zero,
dangerous-default-value,
deprecated-lambda,
Expand All @@ -22,5 +23,5 @@ enable=
singleton-comparison,
too-many-function-args,
unexpected-keyword-arg,
unreachable,
bare-except
unneeded-not,
unreachable
2 changes: 1 addition & 1 deletion mesonbuild/interpreter/interpreterobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def disabled_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> bool:
@noPosargs
@noKwargs
def allowed_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> bool:
return not self.value == 'disabled'
return self.value != 'disabled'

@noPosargs
@noKwargs
Expand Down

0 comments on commit 1fc3d86

Please sign in to comment.