Commit Graph

35 Commits

Author SHA1 Message Date
0c49b9309d Persist unknown groups 2023-11-18 23:58:18 -08:00
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
2c79e62765 Fix exported names 2023-11-18 12:43:53 -08:00
27ca830b60 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0)
- [github.com/asottile/setup-cfg-fmt: v2.4.0 → v2.5.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.4.0...v2.5.0)
- [github.com/asottile/reorder-python-imports: v3.10.0 → v3.12.0](https://github.com/asottile/reorder-python-imports/compare/v3.10.0...v3.12.0)
- [github.com/asottile/pyupgrade: v3.10.1 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.15.0)
- [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.7.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.7.0)
2023-11-13 17:18:39 +00:00
101eef56ca Sanitize group names 0.7.2 2023-09-04 18:32:14 -05:00
2f000e12f3 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/add-trailing-comma: v3.0.1 → v3.1.0](https://github.com/asottile/add-trailing-comma/compare/v3.0.1...v3.1.0)
- https://github.com/pre-commit/mirrors-autopep8https://github.com/hhatto/autopep8
- [github.com/hhatto/autopep8: v2.0.2 → v2.0.4](https://github.com/hhatto/autopep8/compare/v2.0.2...v2.0.4)
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.0...v1.5.1)
2023-09-04 19:22:46 +00:00
0301e1698c Merge pull request #5 from lordwelch/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-08-15 07:43:05 -07:00
6af1e3c562 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/setup-cfg-fmt: v2.3.0 → v2.4.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.3.0...v2.4.0)
- [github.com/asottile/add-trailing-comma: v2.5.1 → v3.0.1](https://github.com/asottile/add-trailing-comma/compare/v2.5.1...v3.0.1)
- [github.com/asottile/pyupgrade: v3.7.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.10.1)
- [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.5.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.3.0...v1.5.0)
2023-08-14 19:13:59 +00:00
fe3bce42fd [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/reorder-python-imports: v3.9.0 → v3.10.0](https://github.com/asottile/reorder-python-imports/compare/v3.9.0...v3.10.0)
- [github.com/asottile/add-trailing-comma: v2.4.0 → v2.5.1](https://github.com/asottile/add-trailing-comma/compare/v2.4.0...v2.5.1)
- [github.com/asottile/dead: v1.5.1 → v1.5.2](https://github.com/asottile/dead/compare/v1.5.1...v1.5.2)
- [github.com/asottile/pyupgrade: v3.4.0 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.4.0...v3.7.0)
2023-06-19 19:05:50 +00:00
4c41e6f588 Use a custom class for typing
Add support for nargs to default to list[str]
0.7.1
2023-06-09 15:41:18 -07:00
b599097cc1 Adds a function to generate a class for typing a namespace 0.7.0 2023-06-08 22:54:36 -07:00
8af75d3962 Update docstrings and ensure parameters are consistent 2023-06-08 21:44:07 -07:00
e57ee25a60 Make get_namespace consistent with normalize_config 2023-06-08 21:44:07 -07:00
14357c14de [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/setup-cfg-fmt: v2.2.0 → v2.3.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.2.0...v2.3.0)
- https://github.com/asottile/reorder_python_importshttps://github.com/asottile/reorder-python-imports
- [github.com/asottile/dead: v1.5.0 → v1.5.1](https://github.com/asottile/dead/compare/v1.5.0...v1.5.1)
- [github.com/asottile/pyupgrade: v3.3.2 → v3.4.0](https://github.com/asottile/pyupgrade/compare/v3.3.2...v3.4.0)
- [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0)
2023-06-05 18:41:50 +00:00
3ed9571156 Merge pull request #2 from lordwelch/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-05-06 09:32:31 -07:00
c76ded2c4f [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.3.1 → v3.3.2](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.3.2)
2023-05-01 18:48:23 +00:00
78ac274e31 Include pyproject.toml 0.6.5 2023-04-26 15:32:06 -07:00
05c2196fcf Update minimum requirements for typing-extensions 0.6.4 2023-04-26 15:04:57 -07:00
e2ff779c30 Add py.typed 0.6.3 2023-04-25 00:13:51 -07:00
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
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
ea5be60c63 Add un-committed fix and version bump 0.6.2 2023-02-20 02:07:35 -08:00
391f65c71f Version Bump 0.6.1 2023-02-20 02:01:02 -08:00
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
69800f01b6 Version Bump 0.6.0 2023-02-19 22:22:45 -08:00
b2eaa12a0e Upgrade pre-commit 2023-02-19 22:21:05 -08:00
fe7c821605 Add a display_name attribute to Setting 2023-02-19 18:39:35 -08:00
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
41cf2dc7cd Version Bump 0.5.0 2023-01-31 19:35:35 -08:00
577b43c4e8 Fix regression with settings with a '-' 2023-01-31 19:35:10 -08:00
983fe782a3 Version Bump 0.4.0 2023-01-31 19:19:04 -08:00
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
c3976c2fb5 Version Bump 0.3.0 2022-12-15 19:00:40 -08:00
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
eb0b6ec0fe Initial Commit 0.2.0 2022-12-14 20:57:57 -08:00