Skip to content

Commit

Permalink
Allow scripts to pass arguments to script_main()
Browse files Browse the repository at this point in the history
The default behaviour is to use sys.argv.
  • Loading branch information
mfleming committed Mar 14, 2024
1 parent 0e9f4a4 commit 9d41c48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hunter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def main():
script_main(conf)


def script_main(conf: Config):
def script_main(conf: Config, args: List[str] = None):
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO)

parser = argparse.ArgumentParser(description="Hunts performance regressions in Fallout results")
Expand Down Expand Up @@ -540,7 +540,7 @@ def script_main(conf: Config):
)

try:
args = parser.parse_args()
args = parser.parse_args(args=args)
hunter = Hunter(conf)

if args.command == "list-groups":
Expand Down

0 comments on commit 9d41c48

Please sign in to comment.