aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-08-15 11:08:26 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-10-04 16:29:30 -0400
commite8a85fa8a2cdbbcd5dcefd9152be67e4416338ca (patch)
tree83ed77c6e7372b73fc7f84cb326fd95808335be8 /mesonbuild/dependencies/base.py
parent2d65472c725f18b343aee00bf91b9ac98c08b95f (diff)
downloadmeson-e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca.zip
meson-e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca.tar.gz
meson-e8a85fa8a2cdbbcd5dcefd9152be67e4416338ca.tar.bz2
various python neatness cleanups
All changes were created by running "pyupgrade --py3-only" and committing the results. Although this has been performed in the past, newer versions of pyupgrade can automatically catch more opportunities, notably list comprehensions can use generators instead, in the following cases: - unpacking into function arguments as function(*generator) - unpacking into assignments of the form x, y = generator - as the argument to some builtin functions such as min/max/sorted Also catch a few creeping cases of new code added using older styles.
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 870d164..0b6f544 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -127,7 +127,7 @@ class Dependency(HoldableObject):
def get_all_compile_args(self) -> T.List[str]:
"""Get the compile arguments from this dependency and it's sub dependencies."""
return list(itertools.chain(self.get_compile_args(),
- *[d.get_all_compile_args() for d in self.ext_deps]))
+ *(d.get_all_compile_args() for d in self.ext_deps)))
def get_link_args(self, language: T.Optional[str] = None, raw: bool = False) -> T.List[str]:
if raw and self.raw_link_args is not None:
@@ -137,7 +137,7 @@ class Dependency(HoldableObject):
def get_all_link_args(self) -> T.List[str]:
"""Get the link arguments from this dependency and it's sub dependencies."""
return list(itertools.chain(self.get_link_args(),
- *[d.get_all_link_args() for d in self.ext_deps]))
+ *(d.get_all_link_args() for d in self.ext_deps)))
def found(self) -> bool:
return self.is_found