mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Consistent ordering of filenames
This commit is contained in:
parent
507c327b1a
commit
5b6a5abae9
2 changed files with 11 additions and 11 deletions
|
|
@ -38,14 +38,14 @@ def _hook_msg_start(hook, verbose):
|
|||
|
||||
def _filter_by_include_exclude(filenames, include, exclude):
|
||||
include_re, exclude_re = re.compile(include), re.compile(exclude)
|
||||
return {
|
||||
return [
|
||||
filename for filename in filenames
|
||||
if (
|
||||
include_re.search(filename) and
|
||||
not exclude_re.search(filename) and
|
||||
os.path.lexists(filename)
|
||||
)
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def _filter_by_types(filenames, types, exclude_types):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue