Replies: 2 comments 8 replies
-
@FeryET Could you give an example so it's easier to understand what you mean? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looking at the stack overflow post you should just use the Father type hint as that's how duck typing works, Father quacks like DummyProtocol as it defines do_something. If that's not what you mean, I need another example. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have also asked this question here.
I have an object inside a context I want to use from both it's superclass methods, and given the function, use of its multiple protocol methods it has implemented. How can I typehint it in a way so mypy understands that?
Beta Was this translation helpful? Give feedback.
All reactions