aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-09-07 14:03:41 -0700
committerEli Schwartz <eschwartz@archlinux.org>2022-11-29 23:26:05 -0500
commitd5e899c76808d45854a06a4ba2b006da32480165 (patch)
treeeb2f315230d2448edce06fa1a82666d683b2d6bb /mesonbuild/modules
parenta5d547e0d9ccb523f0baab7fd32e782aa075fb42 (diff)
downloadmeson-d5e899c76808d45854a06a4ba2b006da32480165.zip
meson-d5e899c76808d45854a06a4ba2b006da32480165.tar.gz
meson-d5e899c76808d45854a06a4ba2b006da32480165.tar.bz2
pylint: enable the bad_builtin checker
This finds uses of deny-listed functions, which defaults to map and filter. These functions should be replaced by comprehensions in idiomatic python because: 1. comprehensions are more heavily optimized and are often faster 2. They avoid the need for lambdas in some cases, which make them faster 3. you can do the equivalent in one statement rather than two, which is faster 4. They're easier to read 5. if you need a concrete instance (ie, a list) then you don't have to convert the iterator to a list afterwards
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/external_project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/external_project.py b/mesonbuild/modules/external_project.py
index dbbd84f..c3b01c8 100644
--- a/mesonbuild/modules/external_project.py
+++ b/mesonbuild/modules/external_project.py
@@ -191,7 +191,7 @@ class ExternalProject(NewExtensionModule):
missing.update(missing_vars)
out.append(arg)
if missing:
- var_list = ", ".join(map(repr, sorted(missing)))
+ var_list = ", ".join(repr(m) for m in sorted(missing))
raise EnvironmentException(
f"Variables {var_list} in configure options are missing.")
return out