mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Make entry points simpler
This commit is contained in:
parent
6d1a464c4f
commit
04b421978a
8 changed files with 59 additions and 31 deletions
|
|
@ -5,6 +5,7 @@ import argparse
|
|||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.clientlib.validate_base import get_validator
|
||||
from pre_commit.util import entry
|
||||
|
||||
|
||||
class InvalidManifestError(ValueError): pass
|
||||
|
|
@ -52,6 +53,7 @@ validate_manifest = get_validator(
|
|||
)
|
||||
|
||||
|
||||
@entry
|
||||
def run(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
|
|
@ -73,4 +75,8 @@ def run(argv):
|
|||
print(str(e.args[1]))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue