mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
add new path
This commit is contained in:
parent
0b07bd6379
commit
d75d74b41e
1 changed files with 4 additions and 3 deletions
|
|
@ -14,8 +14,8 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|||
'--pytest',
|
||||
dest='pattern',
|
||||
action='store_const',
|
||||
const=r'.tests_*\.py',
|
||||
default=r'.tests_*\.py',
|
||||
const=r'tests_*\.py',
|
||||
default=r'tests_*\.py',
|
||||
help='(the default) ensure tests match %(const)s',
|
||||
)
|
||||
mutex.add_argument(
|
||||
|
|
@ -41,7 +41,8 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|||
if (
|
||||
not reg.fullmatch(base) and
|
||||
not base == '__init__.py' and
|
||||
not base == 'conftest.py'
|
||||
not base == 'conftest.py' and
|
||||
not base == 'models.py'
|
||||
):
|
||||
retcode = 1
|
||||
print(f'{filename} does not match pattern "{args.pattern}"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue