nanogui icon indicating copy to clipboard operation
nanogui copied to clipboard

Python IDE Autocomplete (stub files?)

Open tcdtech opened this issue 3 years ago • 2 comments

Are there any existing solutions to getting autocomplete/intellisense/code completion working properly with nanogui?

I use VSCode/Visual Studio and neither parse compiled pyd files for code completion, they require accompanying .pyi stub files.

I spent a couple of hours playing with mypy.stubgen and pybind11-stubgen. Both seem to have potential but in the time I gave myself I couldn't get either to run without errors.

I thought I'd ask if anyone else has successfully generated stub files (or has another solution to the problem) before potentially wasting anymore time on it.

tcdtech avatar Aug 08 '21 12:08 tcdtech

Still a big issue in python to use the library. Did you successfully generate the stubs?

cansik avatar Mar 29 '23 16:03 cansik

@tcdtech Since my last comment, I wrote a tool called nanobind-stubgen to generate stubs for nanogui and other nanobind based libraries. Due to the fact that nanobind puts the function signature into the __doc__ string, it was quite easy to generate the pyi files. I have tested it with nanogui and nanobind_example. It is still under development, but ready to generate nanogui stubs for code completion.

cansik avatar Mar 31 '23 09:03 cansik