antocuni / capnpy

Other
45 stars 26 forks source link

Type annotations (for mypy etc.) #41

Open gjcarneiro opened 5 years ago

gjcarneiro commented 5 years ago

One cool featured that would be nice to have would be if capnpy would automatically generate Python type annotations.

Relevant links:

nickmyatt commented 5 years ago

This would be useful, but I cannot see any further announcements: https://github.com/cython/cython/issues/1826#issuecomment-323846354

akhilman commented 2 years ago

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.