Skip to content

Commit d86ec4c

Browse files
style: fix some typos (#1407)
1 parent 617b610 commit d86ec4c

24 files changed

+45
-45
lines changed

commitizen/commands/bump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, config: BaseConfig, arguments: dict):
6868
if arguments[key] is not None
6969
},
7070
}
71-
self.cz = factory.commiter_factory(self.config)
71+
self.cz = factory.committer_factory(self.config)
7272
self.changelog_flag = arguments["changelog"]
7373
self.changelog_config = self.config.settings.get("update_changelog_on_bump")
7474
self.changelog_to_stdout = arguments["changelog_to_stdout"]

commitizen/commands/changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, config: BaseConfig, args):
4949
)
5050

5151
self.encoding = self.config.settings["encoding"]
52-
self.cz = factory.commiter_factory(self.config)
52+
self.cz = factory.committer_factory(self.config)
5353

5454
self.start_rev = args.get("start_rev") or self.config.settings.get(
5555
"changelog_start_rev"

commitizen/commands/check.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, config: BaseConfig, arguments: dict[str, Any], cwd=os.getcwd(
4646

4747
self.config: BaseConfig = config
4848
self.encoding = config.settings["encoding"]
49-
self.cz = factory.commiter_factory(self.config)
49+
self.cz = factory.committer_factory(self.config)
5050

5151
def _valid_command_argument(self):
5252
num_exclusive_args_provided = sum(
@@ -72,15 +72,15 @@ def __call__(self):
7272
raise NoCommitsFoundError(f"No commit found with range: '{self.rev_range}'")
7373

7474
pattern = self.cz.schema_pattern()
75-
ill_formated_commits = [
75+
ill_formatted_commits = [
7676
commit
7777
for commit in commits
7878
if not self.validate_commit_message(commit.message, pattern)
7979
]
8080
displayed_msgs_content = "\n".join(
8181
[
8282
f'commit "{commit.rev}": "{commit.message}"'
83-
for commit in ill_formated_commits
83+
for commit in ill_formatted_commits
8484
]
8585
)
8686
if displayed_msgs_content:

commitizen/commands/commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, config: BaseConfig, arguments: dict):
3535

3636
self.config: BaseConfig = config
3737
self.encoding = config.settings["encoding"]
38-
self.cz = factory.commiter_factory(self.config)
38+
self.cz = factory.committer_factory(self.config)
3939
self.arguments = arguments
4040
self.temp_file: str = get_backup_file_path()
4141

commitizen/commands/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Example:
77

88
def __init__(self, config: BaseConfig, *args):
99
self.config: BaseConfig = config
10-
self.cz = factory.commiter_factory(self.config)
10+
self.cz = factory.committer_factory(self.config)
1111

1212
def __call__(self):
1313
out.write(self.cz.example())

commitizen/commands/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Info:
77

88
def __init__(self, config: BaseConfig, *args):
99
self.config: BaseConfig = config
10-
self.cz = factory.commiter_factory(self.config)
10+
self.cz = factory.committer_factory(self.config)
1111

1212
def __call__(self):
1313
out.write(self.cz.info())

commitizen/commands/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Init:
8282
def __init__(self, config: BaseConfig, *args):
8383
self.config: BaseConfig = config
8484
self.encoding = config.settings["encoding"]
85-
self.cz = factory.commiter_factory(self.config)
85+
self.cz = factory.committer_factory(self.config)
8686
self.project_info = ProjectInfo()
8787

8888
def __call__(self):

commitizen/commands/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Schema:
77

88
def __init__(self, config: BaseConfig, *args):
99
self.config: BaseConfig = config
10-
self.cz = factory.commiter_factory(self.config)
10+
self.cz = factory.committer_factory(self.config)
1111

1212
def __call__(self):
1313
out.write(self.cz.schema())

commitizen/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from commitizen.exceptions import NoCommitizenFoundException
55

66

7-
def commiter_factory(config: BaseConfig) -> BaseCommitizen:
7+
def committer_factory(config: BaseConfig) -> BaseCommitizen:
88
"""Return the correct commitizen existing in the registry."""
99
name: str = config.settings["name"]
1010
try:

commitizen/version_schemes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
else:
2020
import importlib_metadata as metadata
2121

22-
from packaging.version import InvalidVersion # noqa: F401: Rexpose the common exception
22+
from packaging.version import InvalidVersion # noqa: F401: expose the common exception
2323
from packaging.version import Version as _BaseVersion
2424

2525
from commitizen.defaults import MAJOR, MINOR, PATCH, Settings
@@ -78,7 +78,7 @@ def is_prerelease(self) -> bool:
7878

7979
@property
8080
def prerelease(self) -> str | None:
81-
"""The prelease potion of the version is this is a prerelease."""
81+
"""The prerelease potion of the version is this is a prerelease."""
8282
raise NotImplementedError("must be implemented")
8383

8484
@property
@@ -142,7 +142,7 @@ def bump(
142142
prerelease: The type of prerelease, if Any
143143
is_local_version: Whether to increment the local version instead
144144
exact_increment: Treat the increment and prerelease arguments explicitly. Disables logic
145-
that attempts to deduce the correct increment when a prelease suffix is present.
145+
that attempts to deduce the correct increment when a prerelease suffix is present.
146146
"""
147147

148148

@@ -351,15 +351,15 @@ class SemVer2(SemVer):
351351
See: https://semver.org/spec/v2.0.0.html
352352
"""
353353

354-
_STD_PRELEASES = {
354+
_STD_PRERELEASES = {
355355
"a": "alpha",
356356
"b": "beta",
357357
}
358358

359359
@property
360360
def prerelease(self) -> str | None:
361361
if self.is_prerelease and self.pre:
362-
prerelease_type = self._STD_PRELEASES.get(self.pre[0], self.pre[0])
362+
prerelease_type = self._STD_PRERELEASES.get(self.pre[0], self.pre[0])
363363
return f"{prerelease_type}.{self.pre[1]}"
364364
return None
365365

0 commit comments

Comments
 (0)