diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-01-23 17:01:33 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-01-23 17:01:33 -0500 |
commit | 9cb83c3711d737fa3bff56f55e4def8267bae83c (patch) | |
tree | b568d33d60056171335d735a7ed08d574574cad4 /setuptools | |
parent | 8c272f081afc0fb290310eca108a9fa8cab9b44b (diff) | |
download | external_python_setuptools-9cb83c3711d737fa3bff56f55e4def8267bae83c.tar.gz external_python_setuptools-9cb83c3711d737fa3bff56f55e4def8267bae83c.tar.bz2 external_python_setuptools-9cb83c3711d737fa3bff56f55e4def8267bae83c.zip |
Prefer list comprehension to init/append loop. Ref #936.
Diffstat (limited to 'setuptools')
-rwxr-xr-x | setuptools/command/egg_info.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 62bf00aa..1a6ea9cb 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -429,9 +429,11 @@ class FileList(_FileList): def graft(self, dir): """Include all files from 'dir/'.""" - found = [] - for match_dir in glob(dir): - found += distutils.filelist.findall(match_dir) + found = [ + item + for match_dir in glob(dir) + for item in distutils.filelist.findall(match_dir) + ] self.extend(found) return bool(found) |