ProtixIT / dataclass-binder

Python library to bind TOML data to dataclasses in a type-safe way
MIT License
14 stars 2 forks source link

Relax `bind()` argument type to `Mapping` #3

Closed mthuurne closed 1 year ago

mthuurne commented 1 year ago

Currently Binder.bind() takes a dict argument:

https://github.com/ProtixIT/dataclass-binder/blob/8e747018517dddfa91bdf4c3413126759779fbba/src/dataclass_binder/_impl.py#L346

However, as we don't modify the argument, Mapping would suffice. This would make the binder able to parse data structures from other sources than tomllib.