File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import argparse
2- import sys
32
43from pre_commit import color
54from pre_commit import commands
87
98
109@entry
11- def run (argv ):
10+ def main (argv ):
1211 parser = argparse .ArgumentParser ()
1312
1413 subparsers = parser .add_subparsers (dest = 'command' )
@@ -77,4 +76,4 @@ def run(argv):
7776
7877
7978if __name__ == '__main__' :
80- sys . exit (run ())
79+ exit (main ())
Original file line number Diff line number Diff line change 4444 ],
4545 entry_points = {
4646 'console_scripts' : [
47- 'pre-commit = pre_commit.run:run ' ,
47+ 'pre-commit = pre_commit.main:main ' ,
4848 'validate-config = pre_commit.clientlib.validate_config:run' ,
4949 'validate-manifest = pre_commit.clientlib.validate_manifest:run' ,
5050 ],
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def test_cherry_pick_conflict(in_merge_conflict):
3333def get_files_matching_func ():
3434 def get_filenames ():
3535 return (
36- 'pre_commit/run .py' ,
36+ 'pre_commit/main .py' ,
3737 'pre_commit/git.py' ,
3838 'im_a_file_that_doesnt_exist.py' ,
3939 'hooks.yaml' ,
@@ -45,7 +45,7 @@ def get_filenames():
4545def test_get_files_matching_base (get_files_matching_func ):
4646 ret = get_files_matching_func ('' , '^$' )
4747 assert ret == set ([
48- 'pre_commit/run .py' ,
48+ 'pre_commit/main .py' ,
4949 'pre_commit/git.py' ,
5050 'hooks.yaml' ,
5151 ])
@@ -54,7 +54,7 @@ def test_get_files_matching_base(get_files_matching_func):
5454def test_get_files_matching_total_match (get_files_matching_func ):
5555 ret = get_files_matching_func ('^.*\\ .py$' , '^$' )
5656 assert ret == set ([
57- 'pre_commit/run .py' ,
57+ 'pre_commit/main .py' ,
5858 'pre_commit/git.py' ,
5959 ])
6060
You can’t perform that action at this time.
0 commit comments