Skip to content
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

Put information about stub files in the documentation #1959

Closed
KRunchPL opened this issue Oct 31, 2021 · 1 comment · Fixed by #1968
Closed

Put information about stub files in the documentation #1959

KRunchPL opened this issue Oct 31, 2021 · 1 comment · Fixed by #1968

Comments

@KRunchPL
Copy link
Contributor

KRunchPL commented Oct 31, 2021

What is the request about

Describing in a documentation what to do, so your module has hints shown by IDE and types checking tools.

Reasoning

I have just started using pyo3 to create a Python package that I can use in my Python application. It took me some time googling on how to make the hints and typing which is a very common need in my opinion. The simple "How to" would be a nice improvement to the documentation and help newbies, especially that even although my code is working I am not sure if I have found the best solution.

Details of proposed solution

There are two issues I have found that are related to this topic:

As far as I understood, the best way right now is to write the *.pyi files manually and just attach it to the package (with maturin it is easy).

I would be glad to help with this part of documentation, but I am not sure if above statement is completely true or we can somehow use comments/docstrings/signatures in rust code to make it happen.

@davidhewitt
Copy link
Member

Thanks, some additions to the guide would be very welcome. You're correct that the best solution at the moment is to maintain .pyi files manually. It would be awesome to have #510 implemented some day, however it's a future feature!

@davidhewitt davidhewitt linked a pull request Nov 11, 2021 that will close this issue
davidhewitt added a commit that referenced this issue Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants