Skip to content

Conversation

@declaresub
Copy link
Contributor

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

declaresub and others added 2 commits October 22, 2024 14:37
…ble] to Mapping[type, UnstructureHookT] in Converter.__init__.

With this change, pyright no longer complains that the type of make_converter is partially unknown.
@Tinche
Copy link
Member

Tinche commented Oct 23, 2024

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 Tinche merged commit 456c749 into python-attrs:main Oct 25, 2024
9 checks passed
@Tinche
Copy link
Member

Tinche commented Oct 25, 2024

Thanks!

layday added a commit to layday/cattrs that referenced this pull request Mar 18, 2025
Tinche pushed a commit that referenced this pull request Mar 18, 2025
Same as #594, but for the `copy` method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants