Repository navigation
Add populating a config dataclass from multiple INI/TOML sections - #102
Merged
Merged
Conversation
mksanger
approved these changes
Oct 30, 2026
mksanger
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
I'd prefer that the section names weren't split between two variable names whose only purpose is to be rejoined, but I understand the impulse to avoid a breaking change, and I don't have a better idea
Member
Author
Same, but I didn't want to deal with causing a major version bump right now. It could be resolved next time we do have a major release, if we still think it's worth it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This solves an issue I encountered elsewhere where I want to load a config dataclass, but the config values are distributed across two sections. Currently only one section name can be provided, so all the config values must be in one section.
This change allows more than one section to be named while loading, but keeps backward compatibility if only one section is used.