-
-
Notifications
You must be signed in to change notification settings - Fork 420
Open
Description
Problem to solve
Currently ViZDoom (python binding) lacks any form of hinting with modern IDEs like VS Code due to the actual code being in a compiled binary (vizdoom
, vizdoom.exe
, etc.)
As you can see, IDE doesn't know what is a DoomGame
, so it's purely guessing that this is an undocumented function.
How to solve it?
Very simple! I have already merged a generate_vizdoom_stubs.py
into the main branch as part of PR #620. Future ViZDoom versions will have typing support but for existing older versions please make use of this tool, an example has also been given in scripts
folder. It was way cooler but I had to remove all the Unicode emojis so that Github Action can compile :(
To patch existing installed ViZDoom
python src/lib_python/generate_vizdoom_stubs.py -p
You can also try with -h
to see the available functionalities.
Dependencies
- pybind11-stubgen
- (Optional) black
- (Optional) isort
pip install pybind11-stubgen black isort
Metadata
Metadata
Assignees
Labels
No labels