From bb30bedfae499163800ccad9d53d0ee2d41c78f2 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Tue, 30 Aug 2022 19:07:24 +0700 Subject: [PATCH 1/2] add args --- gto/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gto/cli.py b/gto/cli.py index 3843efae..3113a623 100644 --- a/gto/cli.py +++ b/gto/cli.py @@ -474,6 +474,8 @@ def register( None, "--version", "--ver", help="Version name in SemVer format" ), message: Optional[str] = option_message, + simple: str = option_simple, + force: bool = option_force, bump_major: bool = Option( False, "--bump-major", is_flag=True, help="Bump major version" ), @@ -505,6 +507,8 @@ def register( ref=ref or "HEAD", version=version, message=message, + simple=simple, # type: ignore + force=force, bump_major=bump_major, bump_minor=bump_minor, bump_patch=bump_patch, From 6194c34c49621b419cf9e483dc1df0370e50f5d2 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Tue, 30 Aug 2022 19:08:31 +0700 Subject: [PATCH 2/2] rename callback --- gto/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gto/cli.py b/gto/cli.py index 3113a623..f29d5003 100644 --- a/gto/cli.py +++ b/gto/cli.py @@ -223,7 +223,7 @@ def GTOGroupSection(section): ) -def name_callback( # pylint: disable=inconsistent-return-statements +def callback_simple( # pylint: disable=inconsistent-return-statements ctx: typer.Context, param: typer.CallbackParam, # pylint: disable=unused-argument value: str, @@ -240,7 +240,7 @@ def name_callback( # pylint: disable=inconsistent-return-statements "auto", "--simple", help="[auto, true, false] Use simple notation, e.g. rf#prod instead of rf#prod-5", - callback=name_callback, + callback=callback_simple, ) # Typer options to control and filter the output