From e12081537853250e26602bfbed73e41561392785 Mon Sep 17 00:00:00 2001 From: raphael Date: Sun, 16 Jan 2022 22:22:19 +0100 Subject: [PATCH] splits main function and parser --- bump/cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bump/cli.py b/bump/cli.py index a026a1f..7b90b10 100644 --- a/bump/cli.py +++ b/bump/cli.py @@ -4,7 +4,7 @@ import typer cli = typer.Typer() @cli.command() -def main(message = typer.Argument(None, help="The message to be bumped")): +def default(message = typer.Argument(None, help="The message to be bumped")): bp = bump.Bump() if message is None: bp.show_secret() @@ -16,5 +16,8 @@ def push(): bp = bump.Bump() bp.version() +def main(): + typer.run(default) + if __name__ == "__main__": - typer.run(main) + main()