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):
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)
......
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