Skip to content

Commit

Permalink
fix: es sort typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemDoum committed Dec 4, 2024
1 parent 524cea5 commit 76b310d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion icij-common/icij_common/es/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
Collection,
Dict,
List,
Mapping,
Optional,
Sequence,
Set,
Tuple,
Union,
Expand All @@ -28,6 +30,7 @@

logger = logging.getLogger(__name__)
_ES_CLIENTS: Dict[str, AsyncElasticsearch] = dict()
ESSort = Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], None]

PointInTime = Dict[str, Any]

Expand Down Expand Up @@ -143,7 +146,7 @@ def _async_retrying(self) -> AsyncRetrying:
)

async def poll_search_pages(
self, body: Dict, sort: Union[List[str], Tuple[str, ...], None] = None, **kwargs
self, body: Dict, sort: ESSort = None, **kwargs
) -> AsyncGenerator[Dict[str, Any], None]:
retrying = self._async_retrying()
if sort is None:
Expand Down

0 comments on commit 76b310d

Please sign in to comment.