-
Couldn't load subscription status.
- Fork 0
Description
This first needs a design, but it should be possible to generate .pyi files for mypy and code completion.
The hard part is how to represent objective protocols, those aren't named objects in the bindings and aren't really types. This might need a mypy plugin...
Mypy doesn't understand metaclasses, and especially not those implemented in C. A good enough solution is to use regular classes in the stub files, with "@classmethod" decorators for class methods. This causes a conflict when a class has both a class and instance method of the same name, but there shouldn't be many of those.
One other possible issue: the generated files will be huge (and will get larger when the annotations get more precise), I have no idea if that will cause problems.