From d75d74b41e1e506d2cf196c9f8448a14f7c2eee7 Mon Sep 17 00:00:00 2001 From: Uros <115799310+KatanicU@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:07:49 +0200 Subject: [PATCH] add new path --- pre_commit_hooks/tests_should_end_in_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pre_commit_hooks/tests_should_end_in_test.py b/pre_commit_hooks/tests_should_end_in_test.py index 58e4a06..0452027 100644 --- a/pre_commit_hooks/tests_should_end_in_test.py +++ b/pre_commit_hooks/tests_should_end_in_test.py @@ -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}"')