-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type stubs for Python typing #68
Comments
I think the most reasonable thing to do would be to implement this via pybind, cf. pybind/pybind11#945. Pybind has all the information it needs, it just needs to make it visible to the interpreter. Even better, this would allow us to just drop the documentation-focused signature gathering code in |
@inducer Thanks for the input! Yes I agree that fixing it at the pybind level would be very desirable. Since I would really like to get the type checking to work ASAP, I did a quick implementation for typestub generation in I'm a bit stuck on how That being said, I was able to get pretty good result and my IDE can finally auto-complete islpy functions. |
They just get included, e.g. here: islpy/src/wrapper/wrap_isl_part3.cpp Line 5 in 33cdc99
I could probably be talked into merging this, if you think it's of sufficient quality. (It looks like it's got some debug leftovers in it currently, such as a Unfortunately, it looks like these stubs won't buy us much from the documentation angle, at least for now: sphinx-doc/sphinx#7630. |
Alternatively, is it possible to set |
I'm not really familiar with these annotation magics. |
pybind has |
Hi,
I would like to generate type stubs so that we can use type checking with islpy functions.
I'm thinking of extending
gen_wrap
to achieve this, but was also wondering if the maintainer has any good suggestions?Also, it seems like the sphinx docs can already harvest the type signatures (from the generated c++ wrapper code?).
The text was updated successfully, but these errors were encountered: