Dataclass-binder

Latest version: v0.3.4

Safety actively analyzes 622904 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.3.4

- Support `pathlib.Path` as a field annotation ([40](https://github.com/ProtixIT/dataclass-binder/issues/40))

0.3.3

- Add `Binder.format_toml()` method to generate more compact TOML that excludes unused optional parts ([38](https://github.com/ProtixIT/dataclass-binder/pull/38))

0.3.2

- Document fields with a `default_factory` as optional in template ([35](https://github.com/ProtixIT/dataclass-binder/pull/35))
- Omit values that are formatted equally to the default ([36](https://github.com/ProtixIT/dataclass-binder/pull/36))
- Require optional fields to have `None` as their default ([37](https://github.com/ProtixIT/dataclass-binder/pull/37))

0.3.1

- Generate template in depth-first order ([28](https://github.com/ProtixIT/dataclass-binder/pull/28))
- Fix binder creation and formatting for recursive dataclasses ([28](https://github.com/ProtixIT/dataclass-binder/pull/28))

0.3.0

- Replace `format_template()` function by `Binder.format_toml_template()` method ([23](https://github.com/ProtixIT/dataclass-binder/pull/23))
- Format nested dataclasses as TOML tables ([25](https://github.com/ProtixIT/dataclass-binder/pull/25))
- Format untyped mappings and sequences as TOML tables ([27](https://github.com/ProtixIT/dataclass-binder/pull/27))
- Fix formatting of `init=False` field in nested dataclasses ([22](https://github.com/ProtixIT/dataclass-binder/pull/22))
- Fix annotation evaluation on inherited dataclasses ([21](https://github.com/ProtixIT/dataclass-binder/pull/21))

0.2.0

- Instantiate `Binder` instead of specializing it ([14](https://github.com/ProtixIT/dataclass-binder/pull/14))
This is an API change, but the old syntax is still supported. The details can be found [in the README](https://github.com/ProtixIT/dataclass-binder#binder-specialization).
- Support `typing.Any` as a field annotation ([10](https://github.com/ProtixIT/dataclass-binder/issues/10))
- Fix crash in `format_template()` on optional fields with non-string annotations ([16](https://github.com/ProtixIT/dataclass-binder/pull/16))

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.