elasticsearch-dsl-py icon indicating copy to clipboard operation
elasticsearch-dsl-py copied to clipboard

add type annotations

Open chdsbd opened this issue 2 years ago • 4 comments

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?

chdsbd avatar Sep 22 '21 20:09 chdsbd

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

heinrichreimer avatar Aug 20 '23 20:08 heinrichreimer

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

heinrichreimer avatar Aug 20 '23 20:08 heinrichreimer

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

CosmicTiger avatar Jan 12 '24 13:01 CosmicTiger

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!

pquentin avatar Jan 12 '24 15:01 pquentin