MikePopoloski / pyslang

Python bindings for slang, a library for compiling SystemVerilog
MIT License
40 stars 7 forks source link

Expose API to IDEs through .pyi files #312

Open adwait opened 2 months ago

adwait commented 2 months ago

(feature proposal)

Some editors (e.g., vscode with pylance) do not load *.so files for Python API hints (https://github.com/microsoft/pylance-release/issues/242#issuecomment-674288520).

In such cases it would good to have .pyi stub files. This can be autogenerated using tools such as mypy/stubgen (https://mypy.readthedocs.io/en/stable/stubgen.html). However, this will require some work on the cython library packaging.

The pydrake bindings for the drake C++ library did this sucessfully: https://github.com/RobotLocomotion/drake/issues/16987

adwait commented 2 months ago

Suggested previously here: https://github.com/MikePopoloski/pyslang/issues/96

However, this does not work for me out of the box on version 6.0.

MikePopoloski commented 2 months ago

I agree that this is nice to have but it's not something I have time to spend on any time soon. I'd be happy to accept a PR though if you want to tackle it.