capnpy icon indicating copy to clipboard operation
capnpy copied to clipboard

Type annotations (for mypy etc.)

Open gjcarneiro opened this issue 5 years ago • 2 comments

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/

gjcarneiro avatar Jul 02 '19 15:07 gjcarneiro

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

nickmyatt avatar Aug 29 '19 09:08 nickmyatt

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.

akhilman avatar May 05 '22 06:05 akhilman