Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
e39468d
ci(github-actions): add python 3.14 to github-actions and tox
Lee-W Nov 16, 2025
582a890
refactor(bump): rename parameter and variables
bearomorphism Nov 17, 2025
272cf35
build: update dev dependencies
Lee-W Nov 8, 2025
e030c42
refactor(changelog): raise NotAllow when file_name not passed instead…
Lee-W Nov 8, 2025
fd3d8e1
style(ruff): enable S101 check to avoid assert usage in production code
Lee-W Nov 8, 2025
389364c
fix(bump): remove NotAllowed related to --get-next option, other rela…
bearomorphism Nov 10, 2025
feca6f3
refactor(bump): extract option validation and new version resolution …
bearomorphism Nov 11, 2025
69acb35
refactor(cargo_provider): cleanup and get rid of potential type errors
bearomorphism Sep 13, 2025
08dcee2
docs(exit-codes): general update
bearomorphism Nov 20, 2025
b37a2a7
test: replace try with pytest.raises (#1654)
bearomorphism Dec 3, 2025
cf3114a
fix(git): replace lstrip with strip for compatibility issue
bearomorphism Dec 3, 2025
c8e21c7
perf: add TYPE_CHECKING to CzQuestion imports
bearomorphism Dec 3, 2025
6531d11
fix(cli): debug and no_raise can be used together in sys.excepthook
bearomorphism Dec 3, 2025
aba6015
perf(ruff): enable ruff rules TC001~TC006
bearomorphism Dec 4, 2025
5804fca
fix(version): fix the behavior of cz version --major
bearomorphism Nov 22, 2025
6d7d6cc
refactor(version): rename class member to align with other classes
bearomorphism Nov 27, 2025
0ba30ea
refactor(cli): reword command help and capitalize the first characters
bearomorphism Dec 6, 2025
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 .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
python-check:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
platform: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
15 changes: 9 additions & 6 deletions commitizen/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
import os
import re
from collections import OrderedDict
from collections.abc import Generator, Iterable
from glob import iglob
from logging import getLogger
from string import Template
from typing import cast
from typing import TYPE_CHECKING, cast

from commitizen.defaults import BUMP_MESSAGE, MAJOR, MINOR, PATCH
from commitizen.exceptions import CurrentVersionNotFoundError
from commitizen.git import GitCommit, smart_open
from commitizen.version_schemes import Increment, Version

if TYPE_CHECKING:
from collections.abc import Generator, Iterable

from commitizen.version_schemes import Increment, Version

VERSION_TYPES = [None, PATCH, MINOR, MAJOR]

Expand Down Expand Up @@ -56,13 +59,13 @@ def find_increment(
if increment == MAJOR:
break

return cast(Increment, increment)
return cast("Increment", increment)


def update_version_in_files(
current_version: str,
new_version: str,
files: Iterable[str],
version_files: Iterable[str],
*,
check_consistency: bool,
encoding: str,
Expand All @@ -77,7 +80,7 @@ def update_version_in_files(
"""
updated_files = []

for path, pattern in _resolve_files_and_regexes(files, current_version):
for path, pattern in _resolve_files_and_regexes(version_files, current_version):
current_version_found = False
bumped_lines = []

Expand Down
8 changes: 4 additions & 4 deletions commitizen/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import re
from collections import OrderedDict, defaultdict
from collections.abc import Generator, Iterable, Mapping, MutableMapping, Sequence
from dataclasses import dataclass
from datetime import date
from itertools import chain
Expand All @@ -44,13 +43,14 @@
Template,
)

from commitizen.cz.base import ChangelogReleaseHook
from commitizen.exceptions import InvalidConfigurationError, NoCommitsFoundError
from commitizen.git import GitCommit, GitTag
from commitizen.tags import TagRules

if TYPE_CHECKING:
from commitizen.cz.base import MessageBuilderHook
from collections.abc import Generator, Iterable, Mapping, MutableMapping, Sequence

from commitizen.cz.base import ChangelogReleaseHook, MessageBuilderHook
from commitizen.git import GitCommit, GitTag


@dataclass
Expand Down
8 changes: 5 additions & 3 deletions commitizen/changelog_formats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
from __future__ import annotations

import sys
from typing import Callable, ClassVar, Protocol
from typing import TYPE_CHECKING, Callable, ClassVar, Protocol

if sys.version_info >= (3, 10):
from importlib import metadata
else:
import importlib_metadata as metadata

from commitizen.changelog import Metadata
from commitizen.config.base_config import BaseConfig
from commitizen.exceptions import ChangelogFormatUnknown

if TYPE_CHECKING:
from commitizen.changelog import Metadata
from commitizen.config.base_config import BaseConfig

CHANGELOG_FORMAT_ENTRYPOINT = "commitizen.changelog_format"
TEMPLATE_EXTENSION = "j2"

Expand Down
6 changes: 4 additions & 2 deletions commitizen/changelog_formats/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

import os
from abc import ABCMeta
from typing import IO, Any, ClassVar
from typing import IO, TYPE_CHECKING, Any, ClassVar

from commitizen.changelog import Metadata
from commitizen.config.base_config import BaseConfig
from commitizen.tags import TagRules, VersionTag
from commitizen.version_schemes import get_version_scheme

from . import ChangelogFormat

if TYPE_CHECKING:
from commitizen.config.base_config import BaseConfig


class BaseFormat(ChangelogFormat, metaclass=ABCMeta):
"""
Expand Down
Loading
Loading