capnpy
capnpy copied to clipboard
Type annotations (for mypy etc.)
One cool featured that would be nice to have would be if capnpy would automatically generate Python type annotations.
Relevant links:
- http://mypy-lang.org/
- https://www.python.org/dev/peps/pep-0484/
- https://www.python.org/dev/peps/pep-0561/
This would be useful, but I cannot see any further announcements: https://github.com/cython/cython/issues/1826#issuecomment-323846354
I just tried to manually write the type annotation to the .pyi file. It works well with pylsp even with a compiled pyx extension. The docstring defined in .pyi also showed up as class documentation.