From 4d7031437c7a81b52c776d4ae1e32741bdb851ca Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 31 Aug 2021 09:55:01 -0700 Subject: 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. --- mesonbuild/linkers/linkers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/linkers') diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index db85007..e84d0a4 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -812,7 +812,7 @@ class LLVMDynamicLinker(GnuLikeDynamicLinkerMixin, PosixDynamicLinkerMixin, Dyna # Some targets don't seem to support this argument (windows, wasm, ...) _, _, e = mesonlib.Popen_safe(self.exelist + self._apply_prefix('--allow-shlib-undefined')) - self.has_allow_shlib_undefined = not ('unknown argument: --allow-shlib-undefined' in e) + self.has_allow_shlib_undefined = 'unknown argument: --allow-shlib-undefined' not in e def get_allow_undefined_args(self) -> T.List[str]: if self.has_allow_shlib_undefined: -- cgit v1.1