aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
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/dependencies
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/dependencies')
-rw-r--r--mesonbuild/dependencies/boost.py2
-rw-r--r--mesonbuild/dependencies/detect.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
index 5935b61..038ea17 100644
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -429,7 +429,7 @@ class BoostDependency(SystemDependency):
rootdir = props.get('boost_root')
# It shouldn't be possible to get here without something in boost_root
- assert(rootdir)
+ assert rootdir
raw_paths = mesonlib.stringlistify(rootdir)
paths = [Path(x) for x in raw_paths]
diff --git a/mesonbuild/dependencies/detect.py b/mesonbuild/dependencies/detect.py
index c6865d5..3dc2e3f 100644
--- a/mesonbuild/dependencies/detect.py
+++ b/mesonbuild/dependencies/detect.py
@@ -82,7 +82,7 @@ display_name_map = {
}
def find_external_dependency(name: str, env: 'Environment', kwargs: T.Dict[str, object]) -> T.Union['ExternalDependency', NotFoundDependency]:
- assert(name)
+ assert name
required = kwargs.get('required', True)
if not isinstance(required, bool):
raise DependencyException('Keyword "required" must be a boolean.')