mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-27260: rephrase, use generator instead of list comprehension
This commit is contained in:
@@ -29,7 +29,7 @@ class FileChangesTracker(object):
|
||||
result = {}
|
||||
for tmp_folder, sub_dirs, files in os.walk(folder):
|
||||
sub_dirs[:] = [s for s in sub_dirs if not s.startswith(".")]
|
||||
if any([fnmatch.fnmatch(os.path.basename(tmp_folder), p) for p in patterns]):
|
||||
if any(fnmatch.fnmatch(os.path.basename(tmp_folder), p) for p in patterns):
|
||||
for file in map(lambda f: os.path.join(tmp_folder, f), files):
|
||||
try:
|
||||
result.update({file: os.path.getmtime(file)})
|
||||
|
||||
Reference in New Issue
Block a user