-
Notifications
You must be signed in to change notification settings - Fork 4
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
stub file for Python APIs #235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to learn the project is useful to you. I am not familiar with typing in Python but open to add support for IDEs.
thanks for the quick reply @relf, I'll remove the docstring from the stub file to avoid duplication for now. I also find PyO3/pyo3#2454 which I'll look into a bit. Probably there is easy way to do it better. |
I give it a read on the discussion, the pyo3 didn't yet provide a native way to support generate stub file. There is the crate |
As discussed in #237, I updated the PR with having the stub file auto generated using pyo3-stub-gen. Since it requires a small change on the auto-gen tool. I separate the PR by having this one only have the change with the auto-gen stub file. |
Either ruff format manually or configure to exclude |
I exclude it from ruff check, and seems works in locally. Could you retrigger the tests? Thanks. |
@relf thanks for the tool, I start using it in our project, and it is really nice. I found it would be helpful to have static typing for the IDE for python API. Here is the PR I tried to add the stub file for the python APIs.