Fixed #28249 -- Removed unnecessary dict.keys() calls.

iter(dict) is equivalent to iter(dict.keys()).
This commit is contained in:
Jon Dufresne 2017-05-27 16:08:46 -07:00 committed by Tim Graham
parent 2a5708a304
commit 21046e7773
43 changed files with 84 additions and 85 deletions

View file

@ -232,7 +232,7 @@ class HashedFilesMixin:
# build a list of adjustable files
adjustable_paths = [
path for path in paths
if matches_patterns(path, self._patterns.keys())
if matches_patterns(path, self._patterns)
]
# Do a single pass first. Post-process all files once, then repeat for
# adjustable files.
@ -261,7 +261,7 @@ class HashedFilesMixin:
def path_level(name):
return len(name.split(os.sep))
for name in sorted(paths.keys(), key=path_level, reverse=True):
for name in sorted(paths, key=path_level, reverse=True):
substitutions = True
# use the original, local file, not the copied-but-unprocessed
# file, which might be somewhere far away, like S3