diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-01 16:52:26 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-01 17:01:31 -0500 |
commit | 0a6e485d92907dbaba8301a29335900501513621 (patch) | |
tree | c84a947bc61d273818db94c2e01662881c7c162d | |
parent | 4c55947c47927e3694e2fd41a3987a717692faca (diff) | |
download | meson-0a6e485d92907dbaba8301a29335900501513621.zip meson-0a6e485d92907dbaba8301a29335900501513621.tar.gz meson-0a6e485d92907dbaba8301a29335900501513621.tar.bz2 |
pylint 2.16: join iterables without repeated append
We do += style joining in a loop, but we could just join with
`''.join()` which is faster, neater, and simpler.
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index ed485d2..d44dd4d 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -882,9 +882,7 @@ class CLikeCompiler(Compiler): if extra_args is None: extra_args = [] # Create code that accesses all members - members = '' - for member in membernames: - members += f'foo.{member};\n' + members = ''.join(f'foo.{member};\n' for member in membernames) t = f'''{prefix} void bar(void) {{ {typename} foo; |