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. --- packaging/createpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packaging/createpkg.py') diff --git a/packaging/createpkg.py b/packaging/createpkg.py index 95a70944b..793d4bf88 100755 --- a/packaging/createpkg.py +++ b/packaging/createpkg.py @@ -57,7 +57,7 @@ class PkgGenerator: os.makedirs(self.bindir) ln_base = os.path.relpath(self.mesonstashdir, self.bindir) ninja_bin = shutil.which('ninja') - assert(ninja_bin) + assert ninja_bin shutil.copy(ninja_bin, self.bindir) subprocess.check_call(['strip', os.path.join(self.bindir, 'ninja')]) os.symlink(os.path.join(ln_base, 'meson'), os.path.join(self.bindir, 'meson')) -- cgit v1.2.3