Skip to content

Conversation

Crocmagnon
Copy link
Contributor

Followup of #798

@Crocmagnon
Copy link
Contributor Author

Thank you for your help!

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Can you please add a simple test case for it?
Because this looks quite complex, we don't want to break it in the future.

@Crocmagnon
Copy link
Contributor Author

Crocmagnon commented Dec 30, 2021

Well, unfortunately the precise typing I was going with was not usable on a real subclass and I couldn't find a way to make it work.

Seems like mypy doesn't appreciate Unions of Callables as potential methods. I went with Any, as it at least lets people know that these exist even if the type doesn't give much information.

How should I test it?

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any is fine as is! Thanks!

@sobolevn sobolevn merged commit 3b02222 into typeddjango:master Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants