You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and we try to pass a list[Action] to actions then Mypy will complain: Argument "actions" to "bulk" has incompatible type "list[Action]"; expected "Iterable[bytes | str | dict[str, Any]]"
Changing Dict to Mapping would resolve this issue.
The text was updated successfully, but these errors were encountered:
Elasticsearch version (
bin/elasticsearch --version
): -elasticsearch-py
version (elasticsearch.__versionstr__
): 8.13.0Description of the problem including expected versus actual behavior:
Currently bulk actions are typed with
Dict
;elasticsearch-py/elasticsearch/helpers/actions.py
Lines 45 to 50 in 794341d
TypedDict
s.For example, the relevant part of the signature of
elasticsearch.helpers.actions.bulk
currently looks like this;elasticsearch-py/elasticsearch/helpers/actions.py
Lines 478 to 480 in 794341d
and we try to pass a
list[Action]
toactions
then Mypy will complain:Argument "actions" to "bulk" has incompatible type "list[Action]"; expected "Iterable[bytes | str | dict[str, Any]]"
Changing
Dict
toMapping
would resolve this issue.The text was updated successfully, but these errors were encountered: