Commit Graph

17 Commits

Author SHA1 Message Date
Timmy Welch
e2ff779c30
Add py.typed 2023-04-25 00:13:51 -07:00
Timmy Welch
e9d0e874f3
Merge pull request #1 from lordwelch/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-04-24 23:20:57 -07:00
pre-commit-ci[bot]
c9f5d57ed1
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-autopep8: v2.0.1 → v2.0.2](https://github.com/pre-commit/mirrors-autopep8/compare/v2.0.1...v2.0.2)
- [github.com/pre-commit/mirrors-mypy: v1.0.1 → v1.2.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.1...v1.2.0)
2023-04-24 18:48:25 +00:00
Timmy Welch
ea5be60c63
Add un-committed fix and version bump 2023-02-20 02:07:35 -08:00
Timmy Welch
391f65c71f
Version Bump 2023-02-20 02:01:02 -08:00
Timmy Welch
ba645eb7c6
Implement qoc fixes
Fix fstring
Add comments explaining execution of normalize_config with defaults arg
Fix not removing file or cmdline settings in persistent groups
Fix a bug in get_namespace when config is a namespace
Add additional tests
2023-02-20 01:59:40 -08:00
Timmy Welch
69800f01b6
Version Bump 2023-02-19 22:22:45 -08:00
Timmy Welch
b2eaa12a0e
Upgrade pre-commit 2023-02-19 22:21:05 -08:00
Timmy Welch
fe7c821605
Add a display_name attribute to Setting 2023-02-19 18:39:35 -08:00
Timmy Welch
d07cf9949b
Allow adding settings to existing groups
Calling add_group or add_persistent_group twice will add any new
settings defined.

Raise a ValueError if add_group or add_persistent_group is called during
a call to add_group or add_persistent_group.
2023-02-19 18:07:14 -08:00
Timmy Welch
41cf2dc7cd
Version Bump 2023-01-31 19:35:35 -08:00
Timmy Welch
577b43c4e8
Fix regression with settings with a '-' 2023-01-31 19:35:10 -08:00
Timmy Welch
983fe782a3
Version Bump 2023-01-31 19:19:04 -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
c3976c2fb5
Version Bump 2022-12-15 19:00:40 -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