diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-01 15:57:35 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-01 17:01:30 -0500 |
commit | d6b81307f66d4d20f7d2c9baac74a8449cad640a (patch) | |
tree | fafbd6801f3c6a0f6d5d1f48e3e8f67651d26f6d /mesonbuild | |
parent | 1000246d071be1cc1899080f55cab41646214a40 (diff) | |
download | meson-d6b81307f66d4d20f7d2c9baac74a8449cad640a.zip meson-d6b81307f66d4d20f7d2c9baac74a8449cad640a.tar.gz meson-d6b81307f66d4d20f7d2c9baac74a8449cad640a.tar.bz2 |
pylint 2.16: remove pointless parens around equality assignments
Given the construct `foo = (bar == baz)` some people like parentheses
and some do not. They're pointless and don't mean anything, though. I
don't feel this is particularly helpful to code clarity, tbh, and pylint
now notices this and warns about it in our current pylint config.
I think this is reasonable, so let's remove the odd parens.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 2 | ||||
-rw-r--r-- | mesonbuild/mtest.py | 2 | ||||
-rw-r--r-- | mesonbuild/scripts/vcstagger.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 0ce7f43..5722cbb 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2669,7 +2669,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) is_generated: bool = False) -> 'ImmutableListProtocol[str]': # The code generated by valac is usually crap and has tons of unused # variables and such, so disable warnings for Vala C sources. - no_warn_args = (is_generated == 'vala') + no_warn_args = is_generated == 'vala' # Add compiler args and include paths from several sources; defaults, # build options, external dependencies, etc. commands = self.generate_basic_compiler_args(target, compiler, no_warn_args) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 1feb205..fca9ae0 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -411,7 +411,7 @@ class TAPParser: yield self.Error('more than one plan found') else: num_tests = int(m.group(1)) - skipped = (num_tests == 0) + skipped = num_tests == 0 if m.group(2): if m.group(2).upper().startswith('SKIP'): if num_tests > 0: diff --git a/mesonbuild/scripts/vcstagger.py b/mesonbuild/scripts/vcstagger.py index 051a970..c484ee1 100644 --- a/mesonbuild/scripts/vcstagger.py +++ b/mesonbuild/scripts/vcstagger.py @@ -27,7 +27,7 @@ def config_vcs_tag(infile: str, outfile: str, fallback: str, source_dir: str, re new_data = f.read().replace(replace_string, new_string) if os.path.exists(outfile): with open(outfile, encoding='utf-8') as f: - needs_update = (f.read() != new_data) + needs_update = f.read() != new_data else: needs_update = True if needs_update: |