Skip to content

Commit dfdf23e

Browse files
committed
Fixed inconsistent terms in docstrings
- Switched from using both version parts and version components to simply version components.
1 parent ec95eef commit dfdf23e

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The default configuration only allows bumping the major, minor, or patch version
9292

9393
### Add support for pre-release versions
9494

95-
Alter the `parse` configuration to support pre-release versions. This `parse` option uses an extended (or verbose) regular expression to extract the version parts from the current version.
95+
Alter the `parse` configuration to support pre-release versions. This `parse` option uses an extended (or verbose) regular expression to extract the version components from the current version.
9696

9797
```toml title="New parse configuration"
9898
parse = """(?x)

bumpversion/bump.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def do_bump(
6464
Bump the version_part to the next value or set the version to new_version.
6565
6666
Args:
67-
version_part: The version part to bump
67+
version_part: The name of the version component to bump
6868
new_version: The explicit version to set
6969
config: The configuration to use
7070
config_file: The configuration file to update

bumpversion/cli.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def bump(
287287
config = get_configuration(found_config_file, **overrides)
288288
if args:
289289
if args[0] not in config.parts.keys():
290-
raise click.BadArgumentUsage(f"Unknown version part: {args[0]}")
290+
raise click.BadArgumentUsage(f"Unknown version component: {args[0]}")
291291
version_part = args[0]
292292
files = args[1:]
293293
else:
@@ -335,7 +335,7 @@ def bump(
335335
required=False,
336336
envvar="BUMPVERSION_INCREMENT",
337337
type=str,
338-
help="Increment the version part and add `new_version` to the configuration.",
338+
help="Increment the version component and add `new_version` to the configuration.",
339339
)
340340
def show(args: List[str], config_file: Optional[str], format_: str, increment: Optional[str]) -> None:
341341
"""

bumpversion/config/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_configuration(config_file: Union[str, Path, None] = None, **overrides: A
7070
parsed_config = read_config_file(config_file) if config_file else {}
7171
config_dict = set_config_defaults(parsed_config, **overrides)
7272

73-
# Set any missing version parts
73+
# Set any missing version components
7474
config_dict["parts"] = get_all_part_configs(config_dict)
7575

7676
# Set any missing file configuration

bumpversion/config/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def get_all_file_configs(config_dict: dict) -> List[FileChange]:
16-
"""Make sure all version parts are included."""
16+
"""Make sure all version components are included."""
1717
defaults = {
1818
"parse": config_dict["parse"],
1919
"serialize": config_dict["serialize"],
@@ -31,7 +31,7 @@ def get_all_file_configs(config_dict: dict) -> List[FileChange]:
3131

3232

3333
def get_all_part_configs(config_dict: dict) -> Dict[str, VersionComponentSpec]:
34-
"""Make sure all version parts are included."""
34+
"""Make sure all version components are included."""
3535
try:
3636
parsing_groups = list(re.compile(config_dict["parse"]).groupindex.keys())
3737
except re.error as e:

bumpversion/files.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def _contains_change_pattern(
151151
return True
152152

153153
# The `search` pattern did not match, but the original supplied
154-
# version number (representing the same version part values) might
154+
# version number (representing the same version component values) might
155155
# match instead. This is probably the case if environment variables are used.
156156

157157
# check whether `search` isn't customized

0 commit comments

Comments
 (0)