aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreter.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-08-31 09:55:01 -0700
committerEli Schwartz <eschwartz93@gmail.com>2021-08-31 16:28:54 -0400
commit4d7031437c7a81b52c776d4ae1e32741bdb851ca (patch)
tree7716c4af0d3f43b450a7c94dd42ae5dbef8ebdff /mesonbuild/interpreter/interpreter.py
parent06fdb29daace9ebe55e5df5336f65cba304773d2 (diff)
downloadmeson-4d7031437c7a81b52c776d4ae1e32741bdb851ca.zip
meson-4d7031437c7a81b52c776d4ae1e32741bdb851ca.tar.gz
meson-4d7031437c7a81b52c776d4ae1e32741bdb851ca.tar.bz2
pylint: turn on superflous-parens
We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index c21b90e..1a34885 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -1667,7 +1667,7 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
tg = build.RunTarget(name, cleaned_args, cleaned_deps, self.subdir, self.subproject, env)
self.add_target(name, tg)
full_name = (self.subproject, name)
- assert(full_name not in self.build.run_target_names)
+ assert full_name not in self.build.run_target_names
self.build.run_target_names.add(full_name)
return tg
@@ -1865,7 +1865,7 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
raise InterpreterException(f"Non-existent build file '{buildfilename!s}'")
with open(absname, encoding='utf-8') as f:
code = f.read()
- assert(isinstance(code, str))
+ assert isinstance(code, str)
try:
codeblock = mparser.Parser(code, absname).parse()
except mesonlib.MesonException as me: