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

add type annotations #1533

Closed
chdsbd opened this issue Sep 22, 2021 · 5 comments
Closed

add type annotations #1533

chdsbd opened this issue Sep 22, 2021 · 5 comments

Comments

@chdsbd
Copy link

chdsbd commented Sep 22, 2021

Hi!

Adding type annotations to this library would allow for better auto complete and type checking with tools like mypy and pyright.

Would you accept a PR that adds type annotations?

@janheinrichmerker
Copy link

This would be incredibly useful for the Elasticsearch DSL, as it would mean truly type-safe access to Elasticsearch from Python!

@janheinrichmerker
Copy link

Ideally, the package should then also be declared as a PEP 561 compliant stub package.

@CosmicTiger
Copy link

Hello everyone. I would like to know if there's any continuation regarding this. I often time has this issue from the VSCode Linting and if is possible I would like to help and contribute in solving this issue if you would let me too after a brief explanation on how the project works.
image

@pquentin
Copy link
Member

Hello! As the new maintainer, I am in favor of adding types, but do not want one huge pull request. Instead, it should be done incrementally, as described in https://sethmlarson.dev/tests-arent-enough-case-study-after-adding-types-to-urllib3. I will be happy to review small pull requests, adding types to small files first. Thanks!

@miguelgrinberg
Copy link
Collaborator

This is going to be out with the 8.15 release.

miguelgrinberg added a commit to miguelgrinberg/elasticsearch-dsl-py that referenced this issue Jul 29, 2024
miguelgrinberg added a commit to miguelgrinberg/elasticsearch-dsl-py that referenced this issue Jul 29, 2024
miguelgrinberg added a commit that referenced this issue Jul 29, 2024
github-actions bot pushed a commit that referenced this issue Jul 29, 2024
Fixes #1533

(cherry picked from commit a81ca9d)
miguelgrinberg added a commit that referenced this issue Jul 29, 2024
Fixes #1533

(cherry picked from commit a81ca9d)

Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
miguelgrinberg added a commit to miguelgrinberg/elasticsearch-dsl-py that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants