py27+ syntax improvements

This commit is contained in:
Anthony Sottile
2017-01-21 11:49:53 -08:00
parent 0a93f3bfdd
commit ba75867c93
9 changed files with 31 additions and 34 deletions

View File

@@ -88,7 +88,7 @@ def get_files_matching(all_file_list_strategy):
def wrapper(include_expr, exclude_expr):
include_regex = re.compile(include_expr)
exclude_regex = re.compile(exclude_expr)
return set(
return {
filename
for filename in all_file_list_strategy()
if (
@@ -96,7 +96,7 @@ def get_files_matching(all_file_list_strategy):
not exclude_regex.search(filename) and
os.path.lexists(filename)
)
)
}
return wrapper