spiraldb/ziggy-pydust

Generate *.pyi stub files and py.typed for extensions

robert3005 opened this issue · 1 comments

Having text_signature is not sufficient to get ides to offer code completion. Most of them will not load modules to offer suggestions and only parse them. SInce there's nothing to parse for a native module there's no type hints available.

However, since we generate text_signature we can create a simple python script that would load the build library code and use inspect module to produce type stub files. Additionally we need to include py.typed file in the generated package.

If/When https://github.com/python/cpython/pull/101872/files merges we could offer type hints and not only argument hints.

We should skip generation of stub file if there exists a *.pyi file with the name of the module

fixed in #150, we might want to investigate something more powerful that works during compilation