From 1e3ebc5b144294771b7bfe812299af4f92ae212a Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Mon, 12 Jun 2023 08:44:26 -0500 Subject: [PATCH] Changed exception type raised when bad version part is detected. - ValueError -> click.BadArgumentUsage --- bumpversion/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumpversion/cli.py b/bumpversion/cli.py index 092c1087..fd218d07 100644 --- a/bumpversion/cli.py +++ b/bumpversion/cli.py @@ -222,7 +222,7 @@ def cli( config = get_configuration(found_config_file, **overrides) if args: if args[0] not in config.parts.keys(): - raise ValueError(f"Unknown version part: {args[0]}") + raise click.BadArgumentUsage(f"Unknown version part: {args[0]}") version_part = args[0] files = args[1:] else: