[project] name = "commitizen" version = "4.18.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ { name = "Wei Lee", email = "weilee.rx@gmail.com" }, { name = "Axel H.", email = "noirbizarre@gmail.com" }, { name = "Tim Hsiung", email = "bear890707@gmail.com" }, ] license = "MIT" license-files = ["LICENSE"] readme = "docs/README.md" requires-python = ">=3.10,<4.0" dependencies = [ "questionary (>=2.0,<3.0)", # Exclude transitive dependency due to known issue in questionary: https://github.com/tmbo/questionary/issues/454 "prompt_toolkit!=3.0.52", "decli (>=0.6.0,<1.0)", "colorama (>=0.4.1,<1.0)", "termcolor (>=1.1.0,<4.0.0)", "packaging>=26", "tomlkit (>=0.8.0,<1.0.0)", "jinja2>=2.10.3", "pyyaml>=3.08", "argcomplete >=1.12.1,<3.8", "typing-extensions (>=4.0.1,<5.0.0) ; python_version < '3.11'", "charset-normalizer (>=2.1.0,<4)", "deprecated (>=1.2.13, <2)", # Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility "importlib-metadata >=8.0.0,<8.7.0 ; python_version < '3.10'", ] keywords = ["commitizen", "conventional", "commits", "git"] # See also: https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", ] [project.urls] Homepage = "https://github.com/commitizen-tools/commitizen" Documentation = "https://commitizen-tools.github.io/commitizen/" Repository = "https://github.com/commitizen-tools/commitizen" Issues = "https://github.com/commitizen-tools/commitizen/issues" Changelog = "https://github.com/commitizen-tools/commitizen/blob/master/CHANGELOG.md" [project.scripts] cz = "commitizen.cli:main" git-cz = "commitizen.cli:main" [project.entry-points."commitizen.plugin"] cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz" cz_jira = "commitizen.cz.jira:JiraSmartCz" cz_customize = "commitizen.cz.customize:CustomizeCommitsCz" [project.entry-points."commitizen.changelog_format"] markdown = "commitizen.changelog_formats.markdown:Markdown" asciidoc = "commitizen.changelog_formats.asciidoc:AsciiDoc" textile = "commitizen.changelog_formats.textile:Textile" restructuredtext = "commitizen.changelog_formats.restructuredtext:RestructuredText" [project.entry-points."commitizen.provider"] cargo = "commitizen.providers:CargoProvider" commitizen = "commitizen.providers:CommitizenProvider" composer = "commitizen.providers:ComposerProvider" npm = "commitizen.providers:NpmProvider" pep621 = "commitizen.providers:Pep621Provider" poetry = "commitizen.providers:PoetryProvider" scm = "commitizen.providers:ScmProvider" uv = "commitizen.providers:UvProvider" [project.entry-points."commitizen.scheme"] pep440 = "commitizen.version_schemes:Pep440" semver = "commitizen.version_schemes:SemVer" semver2 = "commitizen.version_schemes:SemVer2" [dependency-groups] dev = [ { include-group = "base" }, { include-group = "test" }, { include-group = "linters" }, { include-group = "documentation" }, { include-group = "script" }, "ipython>=8.0", "tox>4", "tox-uv", ] base = ["mkdocs-llmstxt>=0.5.0", "poethepoet>=0.34.0"] test = [ "pytest>=9", "pytest-cov>=4", "pytest-mock>=3.10", "pytest-regressions>=2.4.0", "pytest-freezer>=0.4.6", "pytest-xdist>=3.1.0", "pytest-gitconfig>=0.9.0", "pre-commit>=4.5.1", ] linters = [ "ruff>=0.11.5", "mypy>=1.16.0", "types-deprecated>=1.2.9.2", "types-python-dateutil>=2.8.19.13", "types-PyYAML>=5.4.3", "types-termcolor>=0.1.1", "types-colorama>=0.4.15.20240311", "prek>=0.2.28", ] documentation = [ "mkdocs>=1.4.2,<2", "mkdocs-git-revision-date-localized-plugin>=1.5.0", "mkdocs-material>=9.1.6", ] script = [ # for scripts/gen_cli_help_screenshots.py "rich>=13.7.1", ] [build-system] requires = ["uv_build >= 0.9.17, < 0.13"] build-backend = "uv_build" [tool.commitizen] tag_format = "v$version" version_files = [ "commitizen/__version__.py", ".pre-commit-config.yaml:rev:.+Commitizen", ] version_provider = "uv" version_scheme = "pep440" annotated_tag = true update_changelog_on_bump = true changelog_incremental = true [tool.uv.build-backend] module-name = "commitizen" module-root = "" include = ["commitizen/py.typed"] [tool.coverage] [tool.coverage.report] show_missing = true exclude_lines = [ # Have to re-enable the standard pragma 'pragma: no cover', # Don't complain about missing debug-only code: 'def __repr__', 'if self\.debug', # Don't complain if tests don't hit defensive assertion code: 'raise AssertionError', 'raise NotImplementedError', # Don't complain if non-runnable code isn't run: 'if 0:', 'if __name__ == .__main__.:', 'if TYPE_CHECKING:', ] omit = [ 'env/*', 'venv/*', '.venv/*', '*/virtualenv/*', '*/virtualenvs/*', '*/tests/*', ] [tool.pytest] addopts = ["--strict-markers"] testpaths = ["tests/"] filterwarnings = [ # get_smart_tag_range is deprecated and will be removed in v5 "ignore:Call to deprecated function \\(or staticmethod\\) get_smart_tag_range:DeprecationWarning", ] [tool.tox] requires = ["tox>=4.22"] env_list = ["3.10", "3.11", "3.12", "3.13", "3.14"] [tool.tox.env_run_base] description = "Run tests suite against Python {base_python}" dependency_groups = ["test"] commands = [["pytest", { replace = "posargs", extend = true }]] [tool.ruff] required-version = ">=0.11.5" line-length = 88 [tool.ruff.lint] select = [ # flake8-annotations "ANN001", "ANN2", # pycodestyle "E", # Pyflakes "F", # pyupgrade "UP", # isort "I", # pygrep-hooks "PGH003", "PGH004", # unsorted-dunder-all "RUF022", # unused-noqa "RUF100", # flake8-pytest-style "PT", # Checks for uses of the assert keyword. "S101", # flake8-type-checking (TC) "TC001", "TC002", "TC003", "TC004", "TC005", "TC006", ] ignore = ["E501", "D1", "D415"] extend-safe-fixes = [ "TC", # Move imports inside/outside TYPE_CHECKING blocks "UP", # Update syntaxes for current Python version recommendations "PT006", # Use tuple in pytest.mark.parametrize ] [tool.ruff.lint.per-file-ignores] "tests/*" = ["ANN", "S101"] [tool.ruff.lint.isort] known-first-party = ["commitizen", "tests"] [tool.ruff.lint.pydocstyle] convention = "google" [tool.mypy] files = ["commitizen", "tests", "scripts"] disallow_untyped_decorators = true disallow_subclassing_any = true warn_return_any = true warn_redundant_casts = true warn_unused_ignores = true warn_unused_configs = true [[tool.mypy.overrides]] module = "py.*" # Legacy pytest dependencies ignore_missing_imports = true [tool.codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = '.git*,*.svg,*.lock' check-hidden = true ignore-words-list = 'asend' [tool.poe] executor.type = "uv" [tool.poe.tasks] format.help = "Format the code" format.sequence = [{ cmd = "ruff check --fix" }, { cmd = "ruff format" }] lint.help = "Lint the code" lint.sequence = [{ cmd = "ruff check" }, { cmd = "mypy" }] check-commit.help = "Check the commit messages" check-commit.cmd = "cz --no-raise 3 check --rev-range origin/master.." test.help = "Run the test suite" test.cmd = "pytest -n auto --dist=loadfile" "test:all".help = "Run the test suite on all supported Python versions" "test:all".cmd = "tox --parallel" "test:regen".help = "Regenerate the test fixtures" "test:regen".parallel = [ { ref = "test -k 'not py_' --regen-all" }, { ref = "test:all -- -k py_ --regen-all" }, ] cover.help = "Run the test suite with coverage" cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen --junitxml=junit.xml -o junit_family=legacy" all.help = "Run all tasks" all.sequence = ["format", "lint", "check-commit", "cover"] "doc:screenshots".help = "Render documentation screenshots" "doc:screenshots".parallel = [ { script = "scripts.gen_cli_help_screenshots:gen_cli_help_screenshots" }, { script = "scripts.gen_cli_interactive_gifs:gen_cli_interactive_gifs" }, ] "doc:build".help = "Build the documentation" "doc:build".cmd = "mkdocs build" doc.help = "Live documentation server" doc.cmd = "mkdocs serve --livereload" # mkdocs hot reload failure workaround. Ref: https://github.com/mkdocs/mkdocs/issues/4032#issuecomment-3591002290 ci.help = "Run all tasks in CI" ci.sequence = ["check-commit", { cmd = "prek run --all-files" }, "cover"] ci.env = { SKIP = "no-commit-to-branch" } setup-pre-commit.help = "Install pre-commit hooks" setup-pre-commit.cmd = "prek install"