From d737a9ca02f9f6b67937744e326f70159478cdf0 Mon Sep 17 00:00:00 2001 From: Jann Kleen Date: Fri, 20 Oct 2023 22:27:52 +0200 Subject: [PATCH 1/2] Fix type annotation of source parameter. --- elasticsearch/_async/client/__init__.py | 2 +- elasticsearch/_sync/client/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/_async/client/__init__.py b/elasticsearch/_async/client/__init__.py index 575794045..8241366c4 100644 --- a/elasticsearch/_async/client/__init__.py +++ b/elasticsearch/_async/client/__init__.py @@ -3370,7 +3370,7 @@ async def search( t.Union[str, t.Mapping[str, t.Any]], ] ] = None, - source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None, + source: t.Optional[t.Union[bool, t.Sequence[str]]] = None, source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None, source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, stats: t.Optional[t.Sequence[str]] = None, diff --git a/elasticsearch/_sync/client/__init__.py b/elasticsearch/_sync/client/__init__.py index 522d2fbd5..57b6fa5fa 100644 --- a/elasticsearch/_sync/client/__init__.py +++ b/elasticsearch/_sync/client/__init__.py @@ -3368,7 +3368,7 @@ def search( t.Union[str, t.Mapping[str, t.Any]], ] ] = None, - source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None, + source: t.Optional[t.Union[bool, t.Sequence[str]]] = None, source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None, source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None, stats: t.Optional[t.Sequence[str]] = None, From aac4d2eb5b534c97a283cb8ea25d5fe75fcd50bf Mon Sep 17 00:00:00 2001 From: Jann Kleen Date: Fri, 20 Oct 2023 22:55:59 +0200 Subject: [PATCH 2/2] Fix type annotation of fields parameter on search method. --- elasticsearch/_async/client/__init__.py | 2 +- elasticsearch/_sync/client/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/_async/client/__init__.py b/elasticsearch/_async/client/__init__.py index 8241366c4..2de1fddfc 100644 --- a/elasticsearch/_async/client/__init__.py +++ b/elasticsearch/_async/client/__init__.py @@ -3322,7 +3322,7 @@ async def search( ] = None, explain: t.Optional[bool] = None, ext: t.Optional[t.Mapping[str, t.Any]] = None, - fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, + fields: t.Optional[t.Sequence[t.Union[t.Mapping[str, t.Any], str]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, from_: t.Optional[int] = None, highlight: t.Optional[t.Mapping[str, t.Any]] = None, diff --git a/elasticsearch/_sync/client/__init__.py b/elasticsearch/_sync/client/__init__.py index 57b6fa5fa..bd3404596 100644 --- a/elasticsearch/_sync/client/__init__.py +++ b/elasticsearch/_sync/client/__init__.py @@ -3320,7 +3320,7 @@ def search( ] = None, explain: t.Optional[bool] = None, ext: t.Optional[t.Mapping[str, t.Any]] = None, - fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None, + fields: t.Optional[t.Sequence[t.Union[t.Mapping[str, t.Any], str]]] = None, filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None, from_: t.Optional[int] = None, highlight: t.Optional[t.Mapping[str, t.Any]] = None,