From 512a3df847da555b8afd648b570e44acac821fbe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 21 Apr 2023 22:36:10 -0400 Subject: [PATCH] Use generator expression for paths. --- importlib_metadata/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index b3028782..1b0198c1 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -536,14 +536,14 @@ def _read_files_egginfo_installed(self): if not text or not subdir: return - ret = [ + paths = ( (subdir / name) .resolve() .relative_to(self.locate_file('').resolve()) .as_posix() for name in text.splitlines() - ] - return map('"{}"'.format, ret) + ) + return map('"{}"'.format, paths) def _read_files_egginfo_sources(self): """