mirror of
https://github.com/django/django.git
synced 2025-10-23 08:42:06 +00:00
Fixed #26125 -- Fixed E731 flake warnings.
This commit is contained in:
parent
abc0777b63
commit
60586dd737
36 changed files with 176 additions and 75 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue