Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_stages:
- push
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: check-vcs-permalinks
- id: end-of-file-fixer
Expand Down
1 change: 0 additions & 1 deletion commitizen/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def _filter_comments(msg: str) -> str:
Returns:
The filtered commit message without comments.
"""

lines = []
for line in msg.split("\n"):
if "# ------------------------ >8 ------------------------" in line:
Expand Down
3 changes: 1 addition & 2 deletions commitizen/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def run(hooks, _env_prefix="CZ_", **env):


def _format_env(prefix: str, env: dict[str, str]) -> dict[str, str]:
"""_format_env() prefixes all given environment variables with the given
prefix so it can be passed directly to cmd.run()."""
"""Prefixes given env variables so they can be passed directly to cmd.run()."""
penv = dict(os.environ)
for name, value in env.items():
name = prefix + name.upper()
Expand Down
34 changes: 17 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,28 @@ typing-extensions = { version = "^4.0.1", python = "<3.8" }
charset-normalizer = ">=2.1.0,<4"

[tool.poetry.dev-dependencies]
ipython = "^7.2"
ipython = "^7.16.2"
# test
pytest = "^7.0.0"
pytest-cov = "^2.6"
pytest-mock = "^2.0"
codecov = "^2.0"
pytest-regressions = "^2.4.0"
pytest = "^7.0.1"
pytest-cov = "^4.0.0"
pytest-mock = "^3.6.1"
codecov = "^2.1.12"
pytest-regressions = "^2.4.2"
pytest-freezer = "^0.4.6"
# code formatter
black = "^21.12b0"
isort = "^5.7.0"
black = "^22.8.0"
isort = "^5.10.1"
# linter
flake8 = "^3.6"
pre-commit = "^2.6.0"
mypy = "^0.931"
types-PyYAML = "^5.4.3"
types-termcolor = "^0.1.1"
flake8 = "^3.9.2"
pre-commit = "^2.17.0"
mypy = "^0.971"
types-PyYAML = "^6.0.0"
types-termcolor = "^1.1.0"
# documentation
mkdocs = "^1.0"
mkdocs-material = "^4.1"
pydocstyle = "^5.0.2"
pytest-xdist = "^2.5.0"
mkdocs = "^1.3.1"
mkdocs-material = "^8.2.11"
pydocstyle = "^6.3.0"
pytest-xdist = "^3.0.2"

[tool.poetry.scripts]
cz = "commitizen.cli:main"
Expand Down
36 changes: 15 additions & 21 deletions tests/test_bump_find_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,13 @@ def test_generate_version(test_input, expected):
prerelease = test_input[2]
prerelease_offset = test_input[3]
devrelease = test_input[4]
assert (
generate_version(
current_version,
increment=increment,
prerelease=prerelease,
prerelease_offset=prerelease_offset,
devrelease=devrelease,
)
== Version(expected)
)
assert generate_version(
current_version,
increment=increment,
prerelease=prerelease,
prerelease_offset=prerelease_offset,
devrelease=devrelease,
) == Version(expected)


@pytest.mark.parametrize(
Expand All @@ -114,14 +111,11 @@ def test_generate_version_local(test_input, expected):
prerelease_offset = test_input[3]
devrelease = test_input[4]
is_local_version = True
assert (
generate_version(
current_version,
increment=increment,
prerelease=prerelease,
prerelease_offset=prerelease_offset,
devrelease=devrelease,
is_local_version=is_local_version,
)
== Version(expected)
)
assert generate_version(
current_version,
increment=increment,
prerelease=prerelease,
prerelease_offset=prerelease_offset,
devrelease=devrelease,
is_local_version=is_local_version,
) == Version(expected)