diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-31 09:32:56 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-08-31 16:28:54 -0400 |
commit | 1fc3d8608d9d278c9faf8ccf6aecf33cc7e92c26 (patch) | |
tree | 069011f64920721a71446c479ff8b8955bd7c6b7 | |
parent | 9e61b4fe99fad66c9dc7484ab62c34a75dec5b60 (diff) | |
download | meson-1fc3d8608d9d278c9faf8ccf6aecf33cc7e92c26.zip meson-1fc3d8608d9d278c9faf8ccf6aecf33cc7e92c26.tar.gz meson-1fc3d8608d9d278c9faf8ccf6aecf33cc7e92c26.tar.bz2 |
pylint: enable unnecessary-not check
This finds things like
```python
if not x == 1:
```
which should be
```python
if x != 1:
```
-rw-r--r-- | .pylintrc | 5 | ||||
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -10,6 +10,7 @@ enable= abstract-class-instantiated, assert-on-tuple, bad-indentation, + bare-except, compare-to-zero, dangerous-default-value, deprecated-lambda, @@ -22,5 +23,5 @@ enable= singleton-comparison, too-many-function-args, unexpected-keyword-arg, - unreachable, - bare-except + unneeded-not, + unreachable diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index 262ff87..b0fe512 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -117,7 +117,7 @@ class FeatureOptionHolder(ObjectHolder[coredata.UserFeatureOption]): @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 |