Make entry points simpler

This commit is contained in:
Anthony Sottile 2014-03-22 18:11:30 -07:00
parent 6d1a464c4f
commit 04b421978a
8 changed files with 59 additions and 31 deletions

View file

@ -6,6 +6,7 @@ import re
import pre_commit.constants as C
from pre_commit.clientlib.validate_base import get_validator
from pre_commit.util import entry
class InvalidConfigError(ValueError): pass
@ -63,6 +64,7 @@ validate_config = get_validator(
)
@entry
def run(argv):
parser = argparse.ArgumentParser()
parser.add_argument(
@ -85,3 +87,7 @@ def run(argv):
return 1
return 0
if __name__ == '__main__':
run()