Commit 9cb83c37 authored by Jason R. Coombs's avatar Jason R. Coombs

Prefer list comprehension to init/append loop. Ref #936.

parent 8c272f08
...@@ -429,9 +429,11 @@ class FileList(_FileList): ...@@ -429,9 +429,11 @@ class FileList(_FileList):
def graft(self, dir): def graft(self, dir):
"""Include all files from 'dir/'.""" """Include all files from 'dir/'."""
found = [] found = [
for match_dir in glob(dir): item
found += distutils.filelist.findall(match_dir) for match_dir in glob(dir)
for item in distutils.filelist.findall(match_dir)
]
self.extend(found) self.extend(found)
return bool(found) return bool(found)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment