-
Notifications
You must be signed in to change notification settings - Fork 183
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
[BUG] IDE fails with autocompletion when working with opensearchpy.helpers #426
Comments
@aimran-adroll propose a fix? |
The .pyi files are wildly outdated, hence the intellisense errors. Deleting the .pyi files from your venv (while unorthodox) solves the issue. The proper solution requires a lot more work though - to go through every .pyi file and update them to match the API. |
@dblock Without knowing too much about opensearchpy internals, I am leaning towards @dannosaur's assessment. There isn't much there in those stub files from what I can tell. |
Contributors, please feel free to address this issue and submit a PR with enhanced pyi files. Multiple PRs are welcome to achieve this. Your contributions are greatly appreciated! |
I would like to work on this issue. |
Could you officially assign me to this issue? |
There are tools to do this automatically: |
Hello @marcosox, I've used mypy/stubgen for writing pyi files for the existing opensearch-py helpers in this repo, but we're still facing this issue. |
@saimedhi What issues are you facing? |
Hello @tannerjones4075, I wanted to mention that for #287 , which introduced most of the helpers to opensearch-py, I used mypy/stubgen to create the pyi files. |
What is the bug?
Trying to debug why a standard editor like intellij/pycharm complains about the opensearch implemented functions, more specifically it thinks functions like
Bool
do not take any arguments!Nothing major but with many lines of codes, the noise become grating.
How can one reproduce the bug?
Open a up to date intellij and open up the following snippets
What is the expected behavior?
At the least, intellisense should be able to pick up on docs enough to provide intelligent completions etc.
What is your host/environment?
Intellij IDEA 2023.1.3/ OSX 13.4
Do you have any screenshots?
See above
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: