diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-09-07 15:23:42 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-10-04 00:33:04 -0400 |
commit | a72840cd2e27bf18b88cf95ef6a9e5e3ab05427d (patch) | |
tree | c3e6ce969bd01ae144f14213dd591e022c453019 /mesonbuild/cmake/traceparser.py | |
parent | f11ebf20ff51dc1e9d6aa07fea64bc891869e48a (diff) | |
download | meson-a72840cd2e27bf18b88cf95ef6a9e5e3ab05427d.zip meson-a72840cd2e27bf18b88cf95ef6a9e5e3ab05427d.tar.gz meson-a72840cd2e27bf18b88cf95ef6a9e5e3ab05427d.tar.bz2 |
pylint: enable use-a-generator
This catches some optimization problems, mostly in the use of `all()`
and `any()`. Basically writing `any([x == 5 for x in f])` vs `any(x == 5
for x in f)` reduces the performance because the entire concrete list
must first be created, then iterated over, while in the second f is
iterated and checked element by element.
Diffstat (limited to 'mesonbuild/cmake/traceparser.py')
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index d9b5f45..d8b97a2 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -83,7 +83,7 @@ class CMakeTarget: return for key, val in self.properties.items(): self.properties[key] = [x.strip() for x in val] - assert all([';' not in x for x in self.properties[key]]) + assert all(';' not in x for x in self.properties[key]) class CMakeGeneratorTarget(CMakeTarget): def __init__(self, name: str) -> None: |