Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 860da72

Browse files
refactor(version_schemes): fix typos
1 parent 30bae00 commit 860da72

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎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

‎tests/commands/test_bump_command.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def test_bump_command_increment_option(
209209

210210

211211
@pytest.mark.usefixtures("tmp_commitizen_project")
212-
def test_bump_command_prelease(mocker: MockFixture):
212+
def test_bump_command_prerelease(mocker: MockFixture):
213213
create_file_and_commit("feat: location")
214214

215215
# Create an alpha pre-release.
@@ -281,7 +281,7 @@ def test_bump_command_prelease(mocker: MockFixture):
281281

282282

283283
@pytest.mark.usefixtures("tmp_commitizen_project")
284-
def test_bump_command_prelease_increment(mocker: MockFixture):
284+
def test_bump_command_prerelease_increment(mocker: MockFixture):
285285
# FINAL RELEASE
286286
create_file_and_commit("fix: location")
287287

@@ -317,7 +317,7 @@ def test_bump_command_prelease_increment(mocker: MockFixture):
317317

318318

319319
@pytest.mark.usefixtures("tmp_commitizen_project")
320-
def test_bump_command_prelease_exact_mode(mocker: MockFixture):
320+
def test_bump_command_prerelease_exact_mode(mocker: MockFixture):
321321
# PRERELEASE
322322
create_file_and_commit("feat: location")
323323

@@ -1062,7 +1062,7 @@ def test_bump_use_version_provider(mocker: MockFixture):
10621062
mock.set_version.assert_called_once_with("0.0.1")
10631063

10641064

1065-
def test_bump_command_prelease_scheme_via_cli(
1065+
def test_bump_command_prerelease_scheme_via_cli(
10661066
tmp_commitizen_project_initial, mocker: MockFixture
10671067
):
10681068
tmp_commitizen_project = tmp_commitizen_project_initial()
@@ -1101,7 +1101,7 @@ def test_bump_command_prelease_scheme_via_cli(
11011101
assert "0.2.0" in f.read()
11021102

11031103

1104-
def test_bump_command_prelease_scheme_via_config(
1104+
def test_bump_command_prerelease_scheme_via_config(
11051105
tmp_commitizen_project_initial, mocker: MockFixture
11061106
):
11071107
tmp_commitizen_project = tmp_commitizen_project_initial(
@@ -1145,7 +1145,7 @@ def test_bump_command_prelease_scheme_via_config(
11451145
assert "0.2.0" in f.read()
11461146

11471147

1148-
def test_bump_command_prelease_scheme_check_old_tags(
1148+
def test_bump_command_prerelease_scheme_check_old_tags(
11491149
tmp_commitizen_project_initial, mocker: MockFixture
11501150
):
11511151
tmp_commitizen_project = tmp_commitizen_project_initial(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /