From 0970348e14fb597623c78f8a52c701a4366cc358 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Martinez Date: Wed, 28 Jun 2023 17:29:41 +0200 Subject: [PATCH 1/3] fix type hints --- redis/commands/search/commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index 3bd7d47aa8..2206a632df 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -372,7 +372,7 @@ def info(self): return dict(zip(it, it)) 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 [] @@ -385,7 +385,7 @@ 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): @@ -402,7 +402,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 From b24b9522c18f45ef6be4b43a6bc374257e74b2e9 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Martinez Date: Tue, 18 Jul 2023 09:45:23 +0200 Subject: [PATCH 2/3] fix lint error --- redis/commands/search/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index 2206a632df..3f8a395d4d 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -385,7 +385,10 @@ def get_params_args( args.append(value) return args - def _mk_query_args(self, query, query_params: Union[Dict[str, Union[str, int, float, bytes]], None]): + 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): From 83998f5fa9f109d2af428c899b28c812e20331b2 Mon Sep 17 00:00:00 2001 From: dvora-h Date: Sun, 6 Aug 2023 05:28:11 +0300 Subject: [PATCH 3/3] fix linters --- redis/commands/search/commands.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index 3f8a395d4d..d0884b29ac 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -386,9 +386,8 @@ def get_params_args( return args def _mk_query_args( - self, - query, - query_params: Union[Dict[str, Union[str, int, float, bytes]], None]): + self, query, query_params: Union[Dict[str, Union[str, int, float, bytes]], None] + ): args = [self.index_name] if isinstance(query, str):