-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate/add stubs for PEP561 and add py.typed #8
Comments
This also depends on either finding a third party way to do this or for Cython to add builtin support. |
Apparently neither mypy nor pyright can successfully generate a draft stub file from a native Cython module 🤷♂️ |
It seems there is some bizarre conflict here where pylance/pyright expects typing files to include docstrings and default values, but none of the existing ones do... |
There seems to be some relevant progress in cython/cython#3818 and cython/cython#5744. I would love to see this issue resolved, because as it is right now, my IDE fails to find any type info for cypcap and considers every reference to a cypcap method or class an error. |
In the meantime it might also be worth checking out the existing .pyx -> .pyi converters mentioned here: cython/cython#3818 (comment) |
Need to figure out a way to extract the types from the Cython module to a
*.pyi
stub file and add apy.typed
file. This should enable autocompletion and type checking.This will require converting from a single file module to a package though. Not sure whether to place all code in an
__init__.pyx
or include an internal_cypcap.pyx
and have__init__.py
do afrom ._cypcap import *
The text was updated successfully, but these errors were encountered: