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.
pull/10811/head
Eli Schwartz 2 years ago
parent 1000246d07
commit d6b81307f6
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      mesonbuild/backend/ninjabackend.py
  2. 2
      mesonbuild/mtest.py
  3. 2
      mesonbuild/scripts/vcstagger.py

@ -2669,7 +2669,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
is_generated: bool = False) -> 'ImmutableListProtocol[str]': is_generated: bool = False) -> 'ImmutableListProtocol[str]':
# The code generated by valac is usually crap and has tons of unused # The code generated by valac is usually crap and has tons of unused
# variables and such, so disable warnings for Vala C sources. # 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, # Add compiler args and include paths from several sources; defaults,
# build options, external dependencies, etc. # build options, external dependencies, etc.
commands = self.generate_basic_compiler_args(target, compiler, no_warn_args) commands = self.generate_basic_compiler_args(target, compiler, no_warn_args)

@ -411,7 +411,7 @@ class TAPParser:
yield self.Error('more than one plan found') yield self.Error('more than one plan found')
else: else:
num_tests = int(m.group(1)) num_tests = int(m.group(1))
skipped = (num_tests == 0) skipped = num_tests == 0
if m.group(2): if m.group(2):
if m.group(2).upper().startswith('SKIP'): if m.group(2).upper().startswith('SKIP'):
if num_tests > 0: if num_tests > 0:

@ -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) new_data = f.read().replace(replace_string, new_string)
if os.path.exists(outfile): if os.path.exists(outfile):
with open(outfile, encoding='utf-8') as f: with open(outfile, encoding='utf-8') as f:
needs_update = (f.read() != new_data) needs_update = f.read() != new_data
else: else:
needs_update = True needs_update = True
if needs_update: if needs_update:

Loading…
Cancel
Save