René's URL Explorer Experiment


Title: fix(types): correct nullability of config fields in command TypedDicts by bearomorphism · Pull Request #1952 · commitizen-tools/commitizen · GitHub

Open Graph Title: fix(types): correct nullability of config fields in command TypedDicts by bearomorphism · Pull Request #1952 · commitizen-tools/commitizen

X Title: fix(types): correct nullability of config fields in command TypedDicts by bearomorphism · Pull Request #1952 · commitizen-tools/commitizen

Description: Description Several command TypedDicts declared fields as non-nullable (int, str, dict, list) while argparse produces None when CLI flags are omitted. Runtime code already handles None correctly (via or fallbacks, .get(), explicit None checks), but the type annotations were misleading to both developers and mypy. Changes CommitArgs: message_length_limit: int → int | None CheckArgs: message_length_limit: int → int | None, allowed_prefixes: list[str] → list[str] | None BumpArgs: file_name: str → str | None ChangelogArgs: file_name, start_rev, tag_format, version_scheme, export_template, template → add | None; extras → dict[str, Any] | None Scope Type annotations only — no behavioral changes. Audit findings A full audit of all Settings fields and command TypedDicts found these inconsistency patterns: 1. CLI args produce None but TypedDict says non-nullable (fixed in this PR) Field TypedDict CLI default message_length_limit int in CommitArgs, CheckArgs None (no argparse default) allowed_prefixes list[str] in CheckArgs None (nargs="*", no default) file_name str in BumpArgs, ChangelogArgs None (no default) start_rev, tag_format, version_scheme, export_template, template str in ChangelogArgs None extras dict[str, Any] in ChangelogArgs None (ParseKwargs action, no default) 2. <= 0 guard consistency for message_length_limit Both code paths correctly treat 0 and negatives as "no limit": commit.py:92-93: if message_length_limit is None or message_length_limit <= 0 check.py → base.py:133: if max_msg_length is not None and max_msg_length > 0 The None check in commit.py:93 was dead code to mypy (type said int). This PR makes it type-correct. The behavioral bug where arguments.get("key", fallback) returns None instead of falling through to config is tracked separately in #1899 / #1900. 3. Out of scope (no changes needed or separate concerns) Settings TypedDict itself: already total=False, so missing defaults aren't a type error Fields missing from DEFAULT_SETTINGS (annotated_tag, gpg_sign, change_type_map, style, customize, version_type): all accessed via .get() or guarded — no runtime risk BumpArgs(Settings) inheritance design: structural refactor tracked in #1672 / #1812 Config validation/coercion layer: base_config.py:49 does raw update() with no type checking — larger effort Related #1899 — the message_length_limit config-ignored bug (this PR makes the types accurate; the behavioral fix is in #1900) #1900 — behavioral fix for message_length_limit precedence (complementary, no conflict) #1812 — ChainMap-based settings refactor (complementary, no conflict) #1672 — tracking issue for the settings chain redesign Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Generated-with: GitHub Copilot CLI following the guidelines Code Changes Add test cases to all the changes you introduce Run uv run poe all locally to ensure this change passes linter check and tests Manually test the changes Update the documentation for the changes No test or doc changes needed — this is a pure type annotation fix with no behavioral impact.

Open Graph Description: Description Several command TypedDicts declared fields as non-nullable (int, str, dict, list) while argparse produces None when CLI flags are omitted. Runtime code already handles None correctly (v...

X Description: Description Several command TypedDicts declared fields as non-nullable (int, str, dict, list) while argparse produces None when CLI flags are omitted. Runtime code already handles None correctly (v...

Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/1952

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7d80f7f0-a31b-f40d-08b9-a4abc391ca0c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9360:1960:52D427C:74C5207:6A505D2F
html-safe-nonce78a53baca50f8338107feeda3bf2ef45d39a1d606e35ff66ba9e793ef820e168
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzYwOjE5NjA6NTJENDI3Qzo3NEM1MjA3OjZBNTA1RDJGIiwidmlzaXRvcl9pZCI6IjM0NzQ5NzI4NTQ1OTU5MDI3NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac539dc6c5992d1a5705997407de0309468e0023edba6b0c739c71b33401c232d2
hovercard-subject-tagpull_request:3648325122
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/commitizen-tools/commitizen/pull/1952/files
twitter:imagehttps://avatars.githubusercontent.com/u/26526132?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/26526132?s=400&v=4
og:image:altDescription Several command TypedDicts declared fields as non-nullable (int, str, dict, list) while argparse produces None when CLI flags are omitted. Runtime code already handles None correctly (v...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/commitizen-tools/commitizen/pull/1952/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fpull%2F1952%2Ffiles
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2Fpull%2F1952%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1952/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1952/files
Reloadhttps://github.com/commitizen-tools/commitizen/pull/1952/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1952/files
commitizen-tools https://github.com/commitizen-tools
commitizenhttps://github.com/commitizen-tools/commitizen
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1952/files
Notifications https://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 344 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
Sign up for GitHub https://github.com/signup?return_to=%2Fcommitizen-tools%2Fcommitizen%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen%2Fissues%2Fnew%2Fchoose
bearomorphismhttps://github.com/bearomorphism
masterhttps://github.com/commitizen-tools/commitizen/tree/master
fix/config-nullability-typeshttps://github.com/commitizen-tools/commitizen/tree/fix/config-nullability-types
Conversation 1 https://github.com/commitizen-tools/commitizen/pull/1952
Commits 1 https://github.com/commitizen-tools/commitizen/pull/1952/commits
Checks 20 https://github.com/commitizen-tools/commitizen/pull/1952/checks
Files changed https://github.com/commitizen-tools/commitizen/pull/1952/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1952/files
fix(types): correct nullability of config fields in command TypedDicts https://github.com/commitizen-tools/commitizen/pull/1952/files#top
Show all changes 1 commit https://github.com/commitizen-tools/commitizen/pull/1952/files
bef33f7 fix(types): correct nullability of config fields in command TypedDicts bearomorphism May 8, 2026 https://github.com/commitizen-tools/commitizen/pull/1952/commits/bef33f72a4e86f9ec99eb4f6d5f10c737e365e4b
Clear filters https://github.com/commitizen-tools/commitizen/pull/1952/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1952/files
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1952/files
bump.py https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-920733205b591ccb6aded23a60aba1c20600036d38b5c224e27da47cf09ffb60
changelog.py https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
check.py https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
commit.py https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-b682eb395fc382939bf1e227cb02ffd1a9335e1ee404b17702afaed226535c74
commitizen/commands/bump.pyhttps://github.com/commitizen-tools/commitizen/pull/1952/files#diff-920733205b591ccb6aded23a60aba1c20600036d38b5c224e27da47cf09ffb60
View file https://github.com/commitizen-tools/commitizen/blob/bef33f72a4e86f9ec99eb4f6d5f10c737e365e4b/commitizen/commands/bump.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1952/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-920733205b591ccb6aded23a60aba1c20600036d38b5c224e27da47cf09ffb60
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-920733205b591ccb6aded23a60aba1c20600036d38b5c224e27da47cf09ffb60
commitizen/commands/changelog.pyhttps://github.com/commitizen-tools/commitizen/pull/1952/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
View file https://github.com/commitizen-tools/commitizen/blob/bef33f72a4e86f9ec99eb4f6d5f10c737e365e4b/commitizen/commands/changelog.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1952/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-c6c18b0eef4f3598794a5fa7177ac53dd0cd8eba8f29ed7be7319c6d431f21c1
commitizen/commands/check.pyhttps://github.com/commitizen-tools/commitizen/pull/1952/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
View file https://github.com/commitizen-tools/commitizen/blob/bef33f72a4e86f9ec99eb4f6d5f10c737e365e4b/commitizen/commands/check.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1952/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-f2009c94d59b697e08241dfc746bd98bd9b47072ba948b2c7bab01fba887b453
commitizen/commands/commit.pyhttps://github.com/commitizen-tools/commitizen/pull/1952/files#diff-b682eb395fc382939bf1e227cb02ffd1a9335e1ee404b17702afaed226535c74
View file https://github.com/commitizen-tools/commitizen/blob/bef33f72a4e86f9ec99eb4f6d5f10c737e365e4b/commitizen/commands/commit.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/commitizen-tools/commitizen/pull/1952/{{ revealButtonHref }}
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-b682eb395fc382939bf1e227cb02ffd1a9335e1ee404b17702afaed226535c74
https://github.com/commitizen-tools/commitizen/pull/1952/files#diff-b682eb395fc382939bf1e227cb02ffd1a9335e1ee404b17702afaed226535c74
Please reload this pagehttps://github.com/commitizen-tools/commitizen/pull/1952/files
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.