Skip to content

Conversation

@bearomorphism
Copy link
Collaborator

@bearomorphism bearomorphism commented Feb 2, 2026

  • 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
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.00%. Comparing base (26e5d80) to head (922bf56).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1842      +/-   ##
==========================================
+ Coverage   97.98%   98.00%   +0.01%     
==========================================
  Files          60       60              
  Lines        2686     2703      +17     
==========================================
+ Hits         2632     2649      +17     
  Misses         54       54              

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

…ction, improve multi config resolution algorithm
@bearomorphism bearomorphism force-pushed the remove-is-empty-config branch from 40c5b7b to 922bf56 Compare February 2, 2026 17:20
Comment on lines +23 to +28
def contains_commitizen_section(self) -> bool:
"""Check if the config file contains a commitizen section.

The implementation is different for each config file type.
"""
raise NotImplementedError()
Copy link
Collaborator Author

@bearomorphism bearomorphism Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether this is a good enough design. I think the state is_empty_config is a bit hard to track. The property is only used in read_cfg function call though.

Sign up for free to 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