mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Make entry points simpler
This commit is contained in:
parent
6d1a464c4f
commit
04b421978a
8 changed files with 59 additions and 31 deletions
|
|
@ -2,11 +2,11 @@
|
|||
import argparse
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from pre_commit import git
|
||||
from pre_commit.clientlib.validate_config import validate_config
|
||||
from pre_commit.repository import Repository
|
||||
from pre_commit.util import entry
|
||||
|
||||
|
||||
RED = '\033[41m'
|
||||
|
|
@ -90,6 +90,7 @@ def run_single_hook(hook_id, configs=None, run_all_the_things=False):
|
|||
return 1
|
||||
|
||||
|
||||
@entry
|
||||
def run(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
|
|
@ -130,4 +131,4 @@ def run(argv):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run(sys.argv[1:])
|
||||
run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue