mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 17:31:28 +08:00
Fix name-tests-test
This commit is contained in:
@ -1,11 +1,16 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
def validate_files(argv=None):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('filenames', nargs='*')
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
retcode = 0
|
||||
for filename in argv:
|
||||
for filename in args.filenames:
|
||||
if (
|
||||
not filename.endswith('_test.py') and
|
||||
not filename.endswith('__init__.py') and
|
||||
|
Reference in New Issue
Block a user