Add type declarations for glyph_api.py#14269
Conversation
|
BTW I think this is valuable enough that it is fine to do in stages, in order to get into users' hands sooner. Even having what is here plus types for just the coordinates would be a very useful addition on its own.
I still think generating the types with a script and checking in the results in a semi-automated fashion would be fine in the short term. |
32a84e6 to
6596517
Compare
6596517 to
1961a27
Compare
|
This should be good enough for the first iteration, though further refinements will be required (e.g. ndarray types and shapes). I added |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Given limitations of Python's typing (e.g. no conditional and mapped types, no type extractors), then there will be a lot of duplication necessary to finalize this. A redesign of model type declarations may also be necessary, because typing of
**kwargshas to be done usingUnpack[]which only supportsTypedDict.fixes #14254