Skip to content

Commit

Permalink
missing type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardbinet committed Sep 23, 2021
1 parent 95ebfae commit 9b92d9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pandagg/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def to_dict(self) -> Dict[str, Any]:
d["version"] = self.version
return d

def save(self) -> None:
def save(self) -> Any:
return self._get_connection().indices.put_index_template(
name=self.name, body=self.to_dict()
)
Expand Down
6 changes: 3 additions & 3 deletions pandagg/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def execute(self) -> SearchResponse:
"""
es = self._get_connection()
raw_data = es.search(index=self._index, body=self.to_dict())
return SearchResponse(data=raw_data, _search=self)
return SearchResponse(data=raw_data, _search=self) # type: ignore

def scan_composite_agg(self, size: int) -> Iterator[BucketDict]:
"""Iterate over the whole aggregation composed buckets, yields buckets."""
Expand Down Expand Up @@ -851,7 +851,7 @@ def delete(self) -> DeleteByQueryResponse:
"""

es = self._get_connection()
return es.delete_by_query(index=self._index, body=self.to_dict())
return es.delete_by_query(index=self._index, body=self.to_dict()) # type: ignore

def __eq__(self, other: Any) -> bool_:
return (
Expand Down Expand Up @@ -942,7 +942,7 @@ def execute(self) -> List[SearchResponseDict]:
Execute the multi search request and return a list of search results.
"""
es = self._get_connection()
return es.msearch(index=self._index, body=self.to_dict(), **self._params)
return es.msearch(index=self._index, body=self.to_dict(), **self._params) # type: ignore

def __eq__(self, other: Any) -> bool:
return (
Expand Down

0 comments on commit 9b92d9f

Please sign in to comment.