Movatterモバイル変換


[0]ホーム

URL:


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

Fine grain config#289

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
pawamoy wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromfine-grain-config
Draft

Fine grain config#289

pawamoy wants to merge2 commits intomainfromfine-grain-config

Conversation

pawamoy
Copy link
Member

No description provided.

This change allows users to specify recursive options under `members`:```::: some.module    options:      members:      - name: SomeName        options:          heading: Some Verbose Name          members:          - ...```This change also brings a refactor in how we combine default, global andlocal configuration. Instead of keeping track of dictionaries to mergethem accordingly, we now chain dataclasses together, using a special`UNSET` value to tell whether an option was set or not. Checking againstthis `UNSET` value lets the chained dataclass know whether it shouldtry to fetch the value from previous (left/up) dataclasses.With the following example chain:```{ some_option: UNSET } -> { some_option: False } -> { some_option: UNSET}```...trying to get `some_option` from the chain would start with theright-most dataclass, where `some_option` is `UNSET`. Then it wouldcontinue on the left, and return `False` since it's not `UNSET`. Theleft-most dataclass would not be checked since the value was alreadyreturned.This change lets us simplify templates, as we don't have to check ifwe're rendering the root object anymore: the configuration options arechained in a way that prevent options that are only relevant to the rootobject to be propagated further down to members.Issue-658:mkdocstrings/mkdocstrings#658
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@pawamoy

[8]ページ先頭

©2009-2025 Movatter.jp