mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Better project structure
This commit is contained in:
parent
f31f092f9b
commit
1746a97e24
52 changed files with 221 additions and 189 deletions
|
|
@ -43,14 +43,15 @@ 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(filter(os.path.exists, (
|
||||
return set(
|
||||
filename
|
||||
for filename in all_file_list_strategy()
|
||||
if (
|
||||
include_regex.search(filename) and
|
||||
not exclude_regex.search(filename)
|
||||
not exclude_regex.search(filename) and
|
||||
os.path.exists(filename)
|
||||
)
|
||||
)))
|
||||
)
|
||||
return wrapper
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue