Skip to content

cli_options

Shared Click option decorators for bump-my-version commands.

Module-level constants cover options that are identical across every command that uses them. Factory functions are provided for options whose type or default intentionally differs between commands, so divergence cannot happen silently.

Functions:

ignore_missing_files_option

ignore_missing_files_option(is_flag: bool = False) -> Callable

Return the --ignore-missing-files Click option decorator.

PARAMETER DESCRIPTION
is_flag

When True, returns a simple boolean flag with no --no- counterpart (used by the replace command). When False (default), returns a tri-state --flag/--no-flag option whose default is None, letting the config-file value win when the flag is omitted (used by the bump command).

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Callable

A Click option decorator ready to be applied with @.

ignore_missing_version_option

ignore_missing_version_option(is_flag: bool = False) -> Callable

Return the --ignore-missing-version Click option decorator.

PARAMETER DESCRIPTION
is_flag

When True, returns a simple boolean flag with no --no- counterpart (used by the replace command). When False (default), returns a tri-state --flag/--no-flag option whose default is None, letting the config-file value win when the flag is omitted (used by the bump command).

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Callable

A Click option decorator ready to be applied with @.