Fixed #26125 -- Fixed E731 flake warnings.

This commit is contained in:
userimack 2016-01-23 22:17:07 +05:30 committed by Tim Graham
parent abc0777b63
commit 60586dd737
36 changed files with 176 additions and 75 deletions

View file

@ -217,11 +217,15 @@ class HashedFilesMixin(object):
hashed_files = OrderedDict()
# build a list of adjustable files
matches = lambda path: matches_patterns(path, self._patterns.keys())
adjustable_paths = [path for path in paths if matches(path)]
adjustable_paths = [
path for path in paths
if matches_patterns(path, self._patterns.keys())
]
# then sort the files by the directory level
path_level = lambda name: len(name.split(os.sep))
def path_level(name):
return len(name.split(os.sep))
for name in sorted(paths.keys(), key=path_level, reverse=True):
# use the original, local file, not the copied-but-unprocessed