manim
manim copied to clipboard
[meta] Missing type system features
This issue attempts to collect and document missing or upcoming type system features that would be necessary to better type the public library interface, as well as mypy bugs preventing us to make use of existing features.
- [ ] Function (and method)
**kwargsTo correctly and extensively type**kwargs, we would need at the very least the ability to tell type checkers that additional keyword arguments are allowed (and of typeAny).- Current status:
The codebase is currently typed with
**kwargs: Any, but this disallows IDEs from discovering extra keyword arguments that are forwarded to other functions. For example, this is a very common pattern across theMobjectandOpenGLMobjectinheritance trees. - Required features:
- Optional features that would improve ergonomics/maintainability:
- in-line
TypedDictdefinitions: there's a draft PEP for this (PEP 764)
- in-line
- Notes: encountered in #4398, discussion on Discord.
- Current status:
The codebase is currently typed with
Related work:
- #3375