Skip to content

Commit

Permalink
Fix type hints in SearchCommands (#2817)
Browse files Browse the repository at this point in the history
* fix type hints

* fix lint error

* fix linters

---------

Co-authored-by: dvora-h <dvora.heller@redis.com>
  • Loading branch information
JoanFM and dvora-h committed Aug 6, 2023
1 parent da27f4b commit 3e50d28
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions redis/commands/search/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def info(self):
return self._parse_results(INFO_CMD, res)

def get_params_args(
self, query_params: Union[Dict[str, Union[str, int, float]], None]
self, query_params: Union[Dict[str, Union[str, int, float, bytes]], None]
):
if query_params is None:
return []
Expand All @@ -464,7 +464,9 @@ def get_params_args(
args.append(value)
return args

def _mk_query_args(self, query, query_params: Dict[str, Union[str, int, float]]):
def _mk_query_args(
self, query, query_params: Union[Dict[str, Union[str, int, float, bytes]], None]
):
args = [self.index_name]

if isinstance(query, str):
Expand All @@ -481,7 +483,7 @@ def _mk_query_args(self, query, query_params: Dict[str, Union[str, int, float]])
def search(
self,
query: Union[str, Query],
query_params: Dict[str, Union[str, int, float]] = None,
query_params: Union[Dict[str, Union[str, int, float, bytes]], None] = None,
):
"""
Search the index for a given query, and return a result of documents
Expand Down

0 comments on commit 3e50d28

Please sign in to comment.