facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.58k stars 419 forks source link

Generate Python stubs with m.css for IDE autocompletion and type checking #2477

Open mosra opened 1 week ago

mosra commented 1 week ago

Based off #2415, but this time with m.css instead of pybind11-stubgen. Which ensures that the output is consistent with online docs, includes various special casing for Habitat, module renaming, etc.

Work-in-progress documentation for the stub generator.

I'm marking it as a draft because even though it works quite well on my own Magnum bindings, there's of course an infinite amount of possibilities where it could break on other code, after all it's just about two weeks of work. Important differences to the previous approach:

Looking forward for your feedback. Let me know once you stumble upon something that feels off.