Closed florianvazelle closed 12 months ago
Merging #440 (00b0e34) into main (4dba35d) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #440 +/- ##
=======================================
Coverage 71.49% 71.49%
=======================================
Files 81 81
Lines 7668 7668
=======================================
Hits 5482 5482
Misses 2186 2186
Hello @florianvazelle, please respond to the following https://github.com/opensearch-project/opensearch-py/pull/399#issuecomment-1642789791. Thanks
@florianvazelle, Could you please finish this PR when you have a moment? Thank you!
Hi @saimedhi, sorry I'm taking some time to study solutions to have a correct stubs package.
The only real way I've found is to use stubtest, but that only ensures that the definitions in the stubs package are defined in the package at runtime too (no extra definitions) and logical with what is defined in the package at runtime (same parameters ...), but if a definition is missing in the stubs package it won't be raised.
I'm going to add this to the linting commands anyway.
To prevent oversights from happening again, I suggest opening a new issue to study solutions, and we'll can then merge this PR.
@florianvazelle I finished #536 so types are back in the game. Do you want to finish this?
I am not sure we need to declare types like this here. For other types we just do self.cat = CatClient(self)
and I think the Python type system is smart enough to figure out that cat
is always CatClient
, but I could be wrong. So either add types as proposed here or remove the declaration?
@dblock I think you fix my issue with #536, I'm closing this PR thank you :wink:
Did I? This code says Any
, should it be typed or should the declaration be removed?
Description
I add the clients of the various plugins to the typing of the main client (
OpenSearch
).