Skip to content

Commit 4b4e1a8

Browse files
committed
Fixing #5 by providing a default value to the main function
1 parent 8e3cab6 commit 4b4e1a8

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

pre_commit_maven/maven.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
import argparse
22
import os.path
3+
import sys
4+
from typing import Optional, Sequence
35
from pre_commit_maven.utils import maven
46
from pre_commit_maven.utils import generic_main
57

68
CWD = os.getcwd()
79

810

9-
def main(argv: list, cwd=CWD, print_fn=print, execute_fn=generic_main.execute) -> int:
11+
def main(
12+
argv: Optional[Sequence[str]] = None,
13+
cwd=CWD,
14+
print_fn=print,
15+
execute_fn=generic_main.execute,
16+
) -> int:
1017
parser = argparse.ArgumentParser()
1118
parser.add_argument("goals", nargs="*", help="maven goals to run")
1219
args = parser.parse_args(argv)

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ covdefaults
55
coverage
66
codecov
77
tox
8+
typing

0 commit comments

Comments
 (0)