From 1d79328d8a6390a02b97148a3ca25f112ae2134f Mon Sep 17 00:00:00 2001 From: Vlad Emelianov Date: Sat, 9 Nov 2024 14:34:40 +0300 Subject: [PATCH] --package overrides --input --- newversion/cli_parser.py | 5 ++++- newversion/main.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/newversion/cli_parser.py b/newversion/cli_parser.py index dfb2a3a..e952df2 100644 --- a/newversion/cli_parser.py +++ b/newversion/cli_parser.py @@ -147,7 +147,10 @@ def parse_args(args: Sequence[str]) -> CLINamespace: "-p", "--package", action="store_true", - help="Get or set Python package version. Supports pyproject.toml, setup.cfg and setup.py.", + help=( + "Get Python package version as input, overrides --input and pipe in." + " Supports pyproject.toml, setup.cfg and setup.py." + ), ) parser.add_argument( "-s", diff --git a/newversion/main.py b/newversion/main.py index 255fefb..30caad5 100644 --- a/newversion/main.py +++ b/newversion/main.py @@ -51,7 +51,7 @@ def main_api(config: CLINamespace) -> str: version=config.version, path=config.path, ) - if config.package and config.version == Version.zero(): + if config.package: executor.version = executor.command_get_version() try: result = _run_main_api(executor, config)