You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking:settings + other now returns a new Settings and leaves both operands unchanged. Use settings += other to add other in place (the old behavior of "+").
Removed the claim that Settings.create accepts a sequence of paths or mappings, which it never supported. Passing one raises a TypeError.
Removed the commented-out env and xml loaders and their options.
Updated to the snickerdoodle 0.5.0 template (Codecov coverage, a coverage page in the docs, pydoclint, Python 3.15, SPDX license metadata, a version read from __version__, GitHub CLI releases, and uv updates from Dependabot). Added .cruft.json so that cruft update can apply future template changes.
Removed the leftovers from pdm (pdm.lock and the credits page and script, which read pdm.lock) and moved the issue templates out of a nested ISSUE_TEMPLATE folder.
Now requires bunches 0.3.0 and wonka 0.3.0 or later, which ship type information, so mypy checks Settings against its base classes. The intentional differences from bunches.Dictionary (add, update, items, keys, and values) are marked with # type: ignore[override].
Settings now inherits fromkeys, setdefault, and subset from bunches.Dictionary instead of repeating them. subset now deep copies the values chosen with include (before, they were shared with the original) and accepts a returns argument ("class", "copy", or "simple"). fromkeys now accepts any iterable of keys and defaults value to None, as dict.fromkeys does.
Documented type inference in the README, including that toml, yaml, and Python module values are not converted, and removed the README acknowledgments.
Added conversion of list and dict strings to Python lists and dicts when inferring types (such as from ini files). [x, y, z] becomes ['x', 'y', 'z'] and {a: 1, b: [x, y]} becomes {'a': 1, 'b': ['x', 'y']}. Items are converted recursively, may be nested, and may be quoted to keep commas or prevent conversion.
Splitting strings on ", " into lists now ignores commas inside brackets or quotes.
Fixed Settings.from_toml, which ignored its keyword arguments (such as parse_float).
Fixed Settings.from_yaml, which raised a TypeError when given any keyword arguments. They are now accepted and ignored.
Fixed loading a file with an unsupported extension, which raised a KeyError instead of the documented TypeError.
Fixed the Settings.create example in the docstring, which was not valid Python.
Restyled the package (single quotes, spaces around keyword argument =, closing brackets on the last line, and complete docstrings). Ruff now enforces single quotes and the 80 character line limit.
mypy now passes and runs in CI. yaml is treated as an untyped import.
Removed the ruff format pre-commit hook, which would undo the package style, and set ruff's force-exclude so pre-commit does not lint excluded folders.
Added tests for the dict methods, inject, subset, fromkeys, missing and unsupported files, keyword arguments, and the private utilities (44 tests in total).