Skip to content

refactor(config): replace is_empty_config with contains_commitizen_section, improve multi config resolution algorithm - #1842

Merged
bearomorphism merged 1 commit into
masterfrom
remove-is-empty-config
Feb 3, 2026
Merged

refactor(config): replace is_empty_config with contains_commitizen_section, improve multi config resolution algorithm#1842
bearomorphism merged 1 commit into
masterfrom
remove-is-empty-config

Conversation

@bearomorphism

@bearomorphismbearomorphism commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator
  • Fixed incorrectly used samefile
  • Removed unnecessary same file check in _resolve_config_candidates. The tests already covered the cases "same git repo root and cwd" so it should not be broken after merging this PR.
  • Separate "empty configuration" detection and _parse_settings

Why removing is_empty_config?

Hmm, I believe a stateless function is easier to read in this case.

@codecov

codecovBot commented Feb 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.99%. Comparing base (26e5d80) to head (2924fae).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@## master #1842 +/- ##
=======================================
Coverage 97.98% 97.99% =======================================
Files 60 60 Lines 2686 2699 +13 =======================================
+ Hits 2632 2645 +13 
Misses 54 54 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment threadcommitizen/config/base_config.py
Comment threadcommitizen/config/toml_config.py Outdated
Comment threadcommitizen/config/base_config.py
…ction, improve multi config resolution algorithm
@bearomorphism
bearomorphism enabled auto-merge (squash) February 3, 2026 15:39
@bearomorphism
bearomorphism merged commit 9783d97 into masterFeb 3, 2026
20 checks passed
@bearomorphism
bearomorphism deleted the remove-is-empty-config branch February 3, 2026 15:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bearomorphism@noirbizarre