Add stubs to python bindings to provide typing information.#2415
Add stubs to python bindings to provide typing information.#2415
Conversation
181e7cd to
060dde3
Compare
jturner65
left a comment
There was a problem hiding this comment.
Please see slack thread here
060dde3 to
4442d23
Compare
4442d23 to
b14371c
Compare
b14371c to
1a5aa70
Compare
1a5aa70 to
b21a32d
Compare
5504972 to
c70299f
Compare
aclegg3
left a comment
There was a problem hiding this comment.
LGTM. Excited to have this, thanks!
|
Eventually it would be good to separate the binding process so that all the enums and classes are instantiated in appropriate order and then all their method bindings are added. This will address circular refs between class methods, where each class has a method argument referencing the other class. |
|
That I'm (partially) handling in the m.css stub output already (#2477) -- there it's the types first and functions after. Doesn't handle type dependencies yet but internally it has knowledge about their dependencies so it could attempt to either sort them or make "forward declarations" when dependencies are cyclic (i.e., stringified annotations). |
|
Hi @0mdc! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Motivation and Context
This changeset adds stubs to python bindings to provide typing information.
Stub generation depends on
pybind11-stubgen.typing-2024-06-16_22.01.01.mp4
How to test:
pip install pybind11-stubgen.habitat-simnormally.WIP:
How Has This Been Tested
Tested by importing
habitat_simin an external Python file.Types of changes
Checklist