Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: try to use ChainMap to chain settings, fix message_length_limit inconsistency #1812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
bearomorphism wants to merge 1 commit into master
base: master
Choose a base branch
Loading
from chain-settings-0119

Conversation

@bearomorphism
Copy link
Collaborator

@bearomorphism bearomorphism commented Jan 19, 2026
edited
Loading

Relate #1672

@bearomorphism bearomorphism changed the title (削除) refactor: try to use ChainMap to chain settings (削除ここまで) (追記) fix: try to use ChainMap to chain settings, fix message_length_limit inconsistency (追記ここまで) Jan 19, 2026
Copy link

codecov bot commented Jan 19, 2026
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.96%. Comparing base (de24815) to head (96caf65).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@
## master #1812 +/- ##
=======================================
 Coverage 97.96% 97.96% 
=======================================
 Files 60 61 +1 
 Lines 2648 2657 +9 
=======================================
+ Hits 2594 2603 +9 
 Misses 54 54 

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

from commitizen.defaults import DEFAULT_SETTINGS, Settings


class ChainSettings:
Copy link
Member

@woile woile Jan 19, 2026
edited
Loading

Choose a reason for hiding this comment

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

Add some docstrings here:

  1. What is this
  2. What it does
  3. How to use
  4. How it compares to the previous solution

That would really help me understand the benefit.

Something I'd like to know as well:
Right now, if I make a plugin, I can create custom settings, but they are not typed. Would this allow plugin to declare their own settings?
example

Copy link
Collaborator Author

@bearomorphism bearomorphism Jan 19, 2026

Choose a reason for hiding this comment

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

Right now, if I make a plugin, I can create custom settings, but they are not typed. Would this allow plugin to declare their own settings?

Thanks, I will put those scenarios into consideration. ChainMap approach should not break the type system.

Copy link
Collaborator Author

@bearomorphism bearomorphism Jan 19, 2026

Choose a reason for hiding this comment

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

How it compares to the previous solution

We can discuss this in #1672. I will share the motivation there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@woile woile woile left review comments

@Lee-W Lee-W Awaiting requested review from Lee-W Lee-W will be requested when the pull request is marked ready for review Lee-W is a code owner

@noirbizarre noirbizarre Awaiting requested review from noirbizarre noirbizarre will be requested when the pull request is marked ready for review noirbizarre is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /