extract args
This commit is contained in:
parent
1e04b57a50
commit
0218386906
6
main.py
6
main.py
@ -259,7 +259,7 @@ def fetch(replay: str, cache: bool = True) -> Replay:
|
||||
return Replay(**data)
|
||||
|
||||
|
||||
def main():
|
||||
def main(args):
|
||||
parser = argparse.ArgumentParser(
|
||||
prog=APP,
|
||||
description="extracts stats from a Showdown replay",
|
||||
@ -282,7 +282,7 @@ def main():
|
||||
)
|
||||
parser.add_argument("replay", nargs="+", help="replay ID or URL")
|
||||
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
args = parser.parse_args(args)
|
||||
if args.verbose and args.verbose > 1:
|
||||
LOG.setLevel(logging.TRACE)
|
||||
elif args.verbose:
|
||||
@ -317,4 +317,4 @@ def main():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main(sys.argv[1:])
|
||||
|
Loading…
Reference in New Issue
Block a user