Skip to content

Commit

Permalink
Changed exception type raised when bad version part is detected.
Browse files Browse the repository at this point in the history
- ValueError -> click.BadArgumentUsage
  • Loading branch information
coordt committed Jun 12, 2023
1 parent da7544f commit 1e3ebc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bumpversion/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1e3ebc5

Please sign in to comment.