René's URL Explorer Experiment


Title: Pre-commit check fails when dependency group includes are used in `pyproject.toml` · Issue #1500 · commitizen-tools/commitizen · GitHub

Open Graph Title: Pre-commit check fails when dependency group includes are used in `pyproject.toml` · Issue #1500 · commitizen-tools/commitizen

X Title: Pre-commit check fails when dependency group includes are used in `pyproject.toml` · Issue #1500 · commitizen-tools/commitizen

Description: Description When committing a pyproject.toml file that uses dependency group includes and the commitizen pre-commit hook, a tomlkit.exceptions.MixedArrayTypesError is raised, failing the check and preventing the commit. This happens when...

Open Graph Description: Description When committing a pyproject.toml file that uses dependency group includes and the commitizen pre-commit hook, a tomlkit.exceptions.MixedArrayTypesError is raised, failing the check and ...

X Description: Description When committing a pyproject.toml file that uses dependency group includes and the commitizen pre-commit hook, a tomlkit.exceptions.MixedArrayTypesError is raised, failing the check and ...

Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/1500

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pre-commit check fails when dependency group includes are used in `pyproject.toml`","articleBody":"### Description\n\nWhen committing a `pyproject.toml` file that uses [dependency group includes](https://packaging.python.org/en/latest/specifications/dependency-groups/#dependency-group-include) and the commitizen pre-commit hook, a `tomlkit.exceptions.MixedArrayTypesError` is raised, failing the check and preventing the commit.\n\nThis happens when using `uv` as dependency manager, I don't know about others.\n\n### Steps to reproduce\n\n1. Create a blank project with `uv init cz-dgi` and enter with `cd cz-dgi`\n2. Add the following `pyproject.toml`:\n   ```toml\n   [project]\n   name = \"czdgi\"\n   version = \"0.1.0\"\n   description = \"Add your description here\"\n   readme = \"README.md\"\n   requires-python = \"\u003e=3.12\"\n   dependencies = [\n       \"commitizen\u003e=4.8.2\",\n       \"pre-commit\u003e=4.2.0\",\n   ]\n    \n   [dependency-groups]\n   nums = [\n       \"pandas\u003e=2.2.3\",\n   ]\n   test = [\n       {include-group = \"nums\"},\n       \"pytest\u003e=8.4.0\",\n   ]\n   ```\n3. Create a `.pre-commit-config.yaml` with the following content:\n   ```yaml    default_install_hook_types:\n      - pre-commit\n      - commit-msg\n    repos:\n      - repo: https://github.com/commitizen-tools/commitizen\n        rev: v1.17.0\n        hooks:\n          - id: commitizen\n            stages: [ commit-msg ]\n    ```\n4. Run `uv run pre-commit install --install-hooks` to install hooks\n5. Try to commit\n\n### Current behavior\n\nThe commit check fails with error:\n```\ncommitizen check.........................................................Failed\n- hook id: commitizen\n- exit code: 1\n\nTraceback (most recent call last):\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/bin/cz\", line 8, in \u003cmodule\u003e\n    sys.exit(main())\n             ^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/commitizen/cli.py\", line 179, in main\n    conf = config.read_cfg()\n           ^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/commitizen/config/__init__.py\", line 60, in read_cfg\n    _conf = TomlConfig(data=data, path=filename)\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/commitizen/config/toml_config.py\", line 10, in __init__\n    self._parse_setting(data)\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/commitizen/config/toml_config.py\", line 39, in _parse_setting\n    doc = parse(data)\n          ^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/api.py\", line 51, in parse\n    return Parser(string).parse()\n           ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/parser.py\", line 153, in parse\n    key, value = self._parse_table()\n                 ^^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/parser.py\", line 1056, in _parse_table\n    item = self._parse_item()\n           ^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/parser.py\", line 302, in _parse_item\n    return self._parse_key_value(True)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/parser.py\", line 387, in _parse_key_value\n    val = self._parse_value()\n          ^^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/parser.py\", line 524, in _parse_value\n    return self._parse_array()\n           ^^^^^^^^^^^^^^^^^^^\n  File \"/home/kinami/.cache/pre-commit/repoo6u1swju/py_env-python3/lib/python3.12/site-packages/tomlkit/parser.py\", line 680, in _parse_array\n    raise self.parse_error(MixedArrayTypesError)\ntomlkit.exceptions.MixedArrayTypesError: Mixed types found in array at line 19 col 1\n```\n\n\n### Desired behavior\n\nThe `pyproject.toml` gets parsed correctly and no errors appear.\n\n### Screenshots\n\n_No response_\n\n### Environment\n\nCommitizen Version: 4.8.2\nPython Version: 3.12.10 (main, May 17 2025, 13:50:06) [Clang 20.1.4 ]\nOperating System: Linux","author":{"url":"https://github.com/kiinami","@type":"Person","name":"kiinami"},"datePublished":"2025-06-03T15:49:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1500/commitizen/issues/1500"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f66a578b-3c15-57d0-967f-c02c5b486f18
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC00:35FB06:EF7A63:1498433:6A4DD542
html-safe-nonceb12680b5f315c181f50ada465db04c32bec2070c7a46ea856d6d02a370a2ffd0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzAwOjM1RkIwNjpFRjdBNjM6MTQ5ODQzMzo2QTRERDU0MiIsInZpc2l0b3JfaWQiOiIzNjc2ODIyMDQxMDM2NDQ0OTk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9a1e378fe156d6580ca5136ea53f115f7a8447ca220d1502060671bd367194d2
hovercard-subject-tagissue:3114528582
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/1500/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0ab627fd53339eb32cbf36c87cd03d27a998fef48692495361126461f3fa15df/commitizen-tools/commitizen/issues/1500
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0ab627fd53339eb32cbf36c87cd03d27a998fef48692495361126461f3fa15df/commitizen-tools/commitizen/issues/1500
og:image:altDescription When committing a pyproject.toml file that uses dependency group includes and the commitizen pre-commit hook, a tomlkit.exceptions.MixedArrayTypesError is raised, failing the check and ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekiinami
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/issues/1500#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1500
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1500
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1500
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1500
Reloadhttps://github.com/commitizen-tools/commitizen/issues/1500
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/1500
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/issues/1500
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 343 https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.5k https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://github.com/commitizen-tools/commitizen
Issues 116 https://github.com/commitizen-tools/commitizen/issues
Pull requests 45 https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality 0 https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Code https://github.com/commitizen-tools/commitizen
Issues https://github.com/commitizen-tools/commitizen/issues
Pull requests https://github.com/commitizen-tools/commitizen/pulls
Discussions https://github.com/commitizen-tools/commitizen/discussions
Actions https://github.com/commitizen-tools/commitizen/actions
Projects https://github.com/commitizen-tools/commitizen/projects
Security and quality https://github.com/commitizen-tools/commitizen/security
Insights https://github.com/commitizen-tools/commitizen/pulse
Pre-commit check fails when dependency group includes are used in pyproject.tomlhttps://github.com/commitizen-tools/commitizen/issues/1500#top
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
os: Linuxissues related to linuxhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20Linux%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/kiinami
kiinamihttps://github.com/kiinami
on Jun 3, 2025https://github.com/commitizen-tools/commitizen/issues/1500#issue-3114528582
dependency group includeshttps://packaging.python.org/en/latest/specifications/dependency-groups/#dependency-group-include
issue-status: needs-triagehttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20needs-triage%22
os: Linuxissues related to linuxhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20Linux%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.