Closed Artur-Galstyan closed 8 months ago
Hi @Artur-Galstyan, I was able to use pybind11-stubgen and point Visual Code to the generated stubs to get type hints.
pip install pybind11-stubgen
pybind11-stubgen mujoco -o ~/typings/ # Installs mujoco stubs dir in $HOME/typings/
Now in visual code, I added the following to my settings.json
:
"python.languageServer": "Pylance",
"python.analysis.stubPath": "~/typings",
and the result:
It's not perfect but I think it generates hints for a good chunk of the API. Hope that helps!
Is your feature request related to a problem? Please describe. Pyright LSP cannot find the MjData, MjModel etc. types 😢
Describe the solution you'd like A potential solution could be adding python stubs, like a
mujoco.pyi
file or something?FYI: I was checking out Brax when I noticed this