Skip to content

Commit 33848a1

Browse files
authored
Merge pull request typesense#62 from tharropoulos/fix-unpack-dict
fix(api-call): remove unpack and use typeddict directly
2 parents b072351 + c7e3386 commit 33848a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/typesense/api_call.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def _execute_request(
334334
as_json: typing.Literal[True],
335335
last_exception: typing.Union[None, Exception] = None,
336336
num_retries: int = 0,
337-
**kwargs: typing.Unpack[SessionFunctionKwargs[TParams, TBody]],
337+
**kwargs: SessionFunctionKwargs[TParams, TBody],
338338
) -> TEntityDict:
339339
"""
340340
Execute a request to the Typesense API with retry logic.
@@ -373,7 +373,7 @@ def _execute_request(
373373
as_json: typing.Literal[False],
374374
last_exception: typing.Union[None, Exception] = None,
375375
num_retries: int = 0,
376-
**kwargs: typing.Unpack[SessionFunctionKwargs[TParams, TBody]],
376+
**kwargs: SessionFunctionKwargs[TParams, TBody],
377377
) -> str:
378378
"""
379379
Execute a request to the Typesense API with retry logic.
@@ -411,7 +411,7 @@ def _execute_request(
411411
as_json: typing.Union[typing.Literal[True], typing.Literal[False]] = True,
412412
last_exception: typing.Union[None, Exception] = None,
413413
num_retries: int = 0,
414-
**kwargs: typing.Unpack[SessionFunctionKwargs[TParams, TBody]],
414+
**kwargs: SessionFunctionKwargs[TParams, TBody],
415415
) -> typing.Union[TEntityDict, str]:
416416
"""
417417
Execute a request to the Typesense API with retry logic.
@@ -493,7 +493,7 @@ def _make_request_and_process_response(
493493
def _prepare_request_params(
494494
self,
495495
endpoint: str,
496-
**kwargs: typing.Unpack[SessionFunctionKwargs[TParams, TBody]],
496+
**kwargs: SessionFunctionKwargs[TParams, TBody],
497497
) -> typing.Tuple[Node, str, SessionFunctionKwargs[TParams, TBody]]:
498498
node = self.node_manager.get_node()
499499
url = node.url() + endpoint

0 commit comments

Comments
 (0)