Commit Graph

8 Commits

Author SHA1 Message Date
Timmy Welch
0c49b9309d Persist unknown groups 2023-11-18 23:58:18 -08:00
Timmy Welch
ccacca1b32 Improve generated namespace
Improve formatting of namespace
Allow _guess_type to return any string
Add tests
2023-11-18 23:31:24 -08:00
Timmy Welch
101eef56ca Sanitize group names 2023-09-04 18:32:14 -05:00
Timmy Welch
fe7c821605
Add a display_name attribute to Setting 2023-02-19 18:39:35 -08:00
Timmy Welch
577b43c4e8
Fix regression with settings with a '-' 2023-01-31 19:35:10 -08:00
Timmy Welch
d2326eadb9
Add support for persistent setting groups
Persistent setting groups allow settings that are not declared to
 survive normalization and other operations that would normally remove
 any unknown keys in a group.

Calling normalize or get_namespace with persistent=False will remove
 unknown keys even from persistent groups.

Currently the only way to retrieve the defaults for a config and
 preserve unknown keys is to manually get the defaults and update each
 existing group with the default values.
2023-01-31 19:18:09 -08:00
Timmy Welch
38e42bf3f9
Make most functions work off of Config objects and Values/Namespace objects
Used Generic for better typing
Backported BooleanOptionalAction for tests on Python 3.8
Remove merge support in normalize_config
Add test to validate that the example works
2022-12-15 18:53:29 -08:00
Timmy Welch
eb0b6ec0fe
Initial Commit 2022-12-14 20:57:57 -08:00