Skip to content

Commit 3e50d28

Browse files
JoanFMdvora-h
andauthored
Fix type hints in SearchCommands (#2817)
* fix type hints * fix lint error * fix linters --------- Co-authored-by: dvora-h <[email protected]>
1 parent da27f4b commit 3e50d28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

redis/commands/search/commands.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def info(self):
451451
return self._parse_results(INFO_CMD, res)
452452

453453
def get_params_args(
454-
self, query_params: Union[Dict[str, Union[str, int, float]], None]
454+
self, query_params: Union[Dict[str, Union[str, int, float, bytes]], None]
455455
):
456456
if query_params is None:
457457
return []
@@ -464,7 +464,9 @@ def get_params_args(
464464
args.append(value)
465465
return args
466466

467-
def _mk_query_args(self, query, query_params: Dict[str, Union[str, int, float]]):
467+
def _mk_query_args(
468+
self, query, query_params: Union[Dict[str, Union[str, int, float, bytes]], None]
469+
):
468470
args = [self.index_name]
469471

470472
if isinstance(query, str):
@@ -481,7 +483,7 @@ def _mk_query_args(self, query, query_params: Dict[str, Union[str, int, float]])
481483
def search(
482484
self,
483485
query: Union[str, Query],
484-
query_params: Dict[str, Union[str, int, float]] = None,
486+
query_params: Union[Dict[str, Union[str, int, float, bytes]], None] = None,
485487
):
486488
"""
487489
Search the index for a given query, and return a result of documents

0 commit comments

Comments
 (0)