Allowing multiple signature in subclass #11282
Unanswered
VirgileUniv
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use-case where i want to allow multiple different signature for methods when subclassing.
I've spend some time trying to make it pyright compliant and have discover some kind of weirdness.
pyright is fine if their is only one signature allowed (f1) but flags f2.
Is this normal behavior ? If so could someone explain to me what's happening :).
I've find a way to make pyright happy using CRTP pattern :
but if someone has something nicer i'll be glad.
I know it is a bit of a weird use case, my
Modelis some kind of dataclass (where some data are callables) that then get's normalized at class creation time.Beta Was this translation helpful? Give feedback.
All reactions