Stubfiles for the Python API #6607
Replies: 2 comments 1 reply
-
no opposition. Could be tedious as Python API is hand-written. def get_version() -> str: ... def is_int(e: ExprRef) -> bool: ... def get_param(name: str) -> str: ... def ExprRef.sexpr(self) -> str: ... |
Beta Was this translation helpful? Give feedback.
-
@NikolajBjorner Kind related to my efforts to do this with stubgen, but I am a bit curious: is there any particular reason to use ctypes instead of pybind11? I am not proposing a change (though I might run a pybind11 binding generator to see what happens), but I am curious because 1) stubgen or pybind11-stubgen tend to do a good job and 2) pybind11 is what I've used for a few python bindings at this point and I've been fairly satisfied sans some pains with Python's gc. |
Beta Was this translation helpful? Give feedback.
-
For usability in python projects that use mypy/other static type checkers/LSP implementations/etc, it would be nice if the Python APIs included stubfiles. I might be willing to take this on if there is no opposition/other plans.
Beta Was this translation helpful? Give feedback.
All reactions