Use tuple comprehensions

Co-Authored-By: mensinda <daniel@mensinger-ka.de>
pull/4914/head
Nirbheek Chauhan 6 years ago committed by Daniel Mensinger
parent bc25a12709
commit b7fa161cb9
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 2
      mesonbuild/dependencies/base.py

@ -1113,7 +1113,7 @@ class CMakeDependency(ExternalDependency):
@functools.lru_cache(maxsize=None) @functools.lru_cache(maxsize=None)
def _cached_listdir(path: str) -> Tuple[Tuple[str, str]]: def _cached_listdir(path: str) -> Tuple[Tuple[str, str]]:
try: try:
return tuple([(x, str(x).lower()) for x in os.listdir(path)]) return tuple((x, str(x).lower()) for x in os.listdir(path))
except OSError: except OSError:
return () return ()

Loading…
Cancel
Save