From d3a3ada03e080f39144807c9fbe44876c40e0548 Mon Sep 17 00:00:00 2001 From: "Bosheng (Daniel) Zhang" <740807262@qq.com> Date: Tue, 17 Oct 2023 00:16:37 +1000 Subject: [PATCH] Update client.py sleep_time typing for run_in_thread function (#2977) Changed from `sleep_time: int = 0` to `sleep_time: float = 0.0` To avoid Pylance complaining: `Argument of type "float" cannot be assigned to parameter "sleep_time" of type "int" in function "run_in_thread" "float" is incompatible with "int"` --- redis/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/client.py b/redis/client.py index b526d7787b..cb91c7a088 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1100,7 +1100,7 @@ def handle_message(self, response, ignore_subscribe_messages=False): def run_in_thread( self, - sleep_time: int = 0, + sleep_time: float = 0.0, daemon: bool = False, exception_handler: Optional[Callable] = None, ) -> "PubSubWorkerThread":