diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-31 09:55:01 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-08-31 16:28:54 -0400 |
commit | 4d7031437c7a81b52c776d4ae1e32741bdb851ca (patch) | |
tree | 7716c4af0d3f43b450a7c94dd42ae5dbef8ebdff /mesonbuild/scripts/depscan.py | |
parent | 06fdb29daace9ebe55e5df5336f65cba304773d2 (diff) | |
download | meson-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/scripts/depscan.py')
-rw-r--r-- | mesonbuild/scripts/depscan.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/scripts/depscan.py b/mesonbuild/scripts/depscan.py index 68e7dc4..f2ec0bd 100644 --- a/mesonbuild/scripts/depscan.py +++ b/mesonbuild/scripts/depscan.py @@ -73,7 +73,7 @@ class DependencyScanner: self.needs[fname] = [needed] if export_match: exported_module = export_match.group(1).lower() - assert(exported_module not in modules_in_this_file) + assert exported_module not in modules_in_this_file modules_in_this_file.add(exported_module) if exported_module in self.provided_by: raise RuntimeError(f'Multiple files provide module {exported_module}.') @@ -128,7 +128,7 @@ class DependencyScanner: def objname_for(self, src: str) -> str: objname = self.target_data.source2object[src] - assert(isinstance(objname, str)) + assert isinstance(objname, str) return objname def module_name_for(self, src: str) -> str: |