Skip to content

Commit 9351913

Browse files
Auto-generated code for 8.18 (#3095)
* Auto-generated API code * remove type ignore --------- Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
1 parent ada8ef9 commit 9351913

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

elasticsearch/dsl/response/aggs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _wrap_bucket(self, data: Dict[str, Any]) -> Bucket[_R]:
6363
)
6464

6565
def __iter__(self) -> Iterator["Agg"]: # type: ignore[override]
66-
return iter(self.buckets) # type: ignore[arg-type]
66+
return iter(self.buckets)
6767

6868
def __len__(self) -> int:
6969
return len(self.buckets)

elasticsearch/dsl/types.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3907,24 +3907,25 @@ def __init__(
39073907

39083908
class TextEmbedding(AttrDict[Any]):
39093909
"""
3910-
:arg model_id: (required)
39113910
:arg model_text: (required)
3911+
:arg model_id: Model ID is required for all dense_vector fields but
3912+
may be inferred for semantic_text fields
39123913
"""
39133914

3914-
model_id: Union[str, DefaultType]
39153915
model_text: Union[str, DefaultType]
3916+
model_id: Union[str, DefaultType]
39163917

39173918
def __init__(
39183919
self,
39193920
*,
3920-
model_id: Union[str, DefaultType] = DEFAULT,
39213921
model_text: Union[str, DefaultType] = DEFAULT,
3922+
model_id: Union[str, DefaultType] = DEFAULT,
39223923
**kwargs: Any,
39233924
):
3924-
if model_id is not DEFAULT:
3925-
kwargs["model_id"] = model_id
39263925
if model_text is not DEFAULT:
39273926
kwargs["model_text"] = model_text
3927+
if model_id is not DEFAULT:
3928+
kwargs["model_id"] = model_id
39283929
super().__init__(kwargs)
39293930

39303931

0 commit comments

Comments
 (0)