python-attrs / cattrs

Composable custom class converters for attrs, dataclasses and friends.
https://catt.rs
MIT License
829 stars 113 forks source link

Converter parameter type hints #594

Closed declaresub closed 1 month ago

declaresub commented 1 month ago

Change type of unstruct_collection_overrides from Mapping[type, Callable] to Mapping[type, UnstructureHookT] in Converter.init.

Tinche commented 1 month ago

Hi!

I took at look at this. I don't think UnstructureHookT is correct though - that's a TypeVar and this isn't a generic function. It should probably be UnstructureHook instead. Does that solve your pyright issue?

Also please add a small changelog entry ;)

Tinche commented 1 month ago

Thanks!