mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 20:16:53 +00:00
Merge pull request #19 from pre-commit/fix_name_tests_test
Fix name-tests-test
This commit is contained in:
commit
b03733bc86
1 changed files with 6 additions and 1 deletions
|
|
@ -1,11 +1,16 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def validate_files(argv=None):
|
def validate_files(argv=None):
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('filenames', nargs='*')
|
||||||
|
args = parser.parse_args(argv)
|
||||||
|
|
||||||
retcode = 0
|
retcode = 0
|
||||||
for filename in argv:
|
for filename in args.filenames:
|
||||||
if (
|
if (
|
||||||
not filename.endswith('_test.py') and
|
not filename.endswith('_test.py') and
|
||||||
not filename.endswith('__init__.py') and
|
not filename.endswith('__init__.py') and
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue