[V2] Annotating custom constructor methods for generic types. #2026
Unanswered
randolf-scholz
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Follow up to #2025. Consider this simple example. Is there any way to annotate
Arrayso that all the checks pass in bothmypyandpyright?I considered 5 different ways to implement it, including the use of metaclasses, but frustratingly, none of them make both
mypyandpyrighthappy.MWE in playground
Code sample in pyright playground
Beta Was this translation helpful? Give feedback.
All reactions