mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove @entry
This commit is contained in:
parent
9a017dcbe9
commit
32817f3958
6 changed files with 10 additions and 52 deletions
|
|
@ -6,10 +6,10 @@ import jsonschema
|
|||
import jsonschema.exceptions
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
from pre_commit.jsonschema_extensions import apply_defaults
|
||||
from pre_commit.util import entry
|
||||
|
||||
|
||||
def is_regex_valid(regex):
|
||||
|
|
@ -64,8 +64,8 @@ def get_validator(
|
|||
|
||||
|
||||
def get_run_function(filenames_help, validate_strategy, exception_cls):
|
||||
@entry
|
||||
def run(argv):
|
||||
def run(argv=None):
|
||||
argv = argv if argv is not None else sys.argv[1:]
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('filenames', nargs='*', help=filenames_help)
|
||||
args = parser.parse_args(argv)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue