From 4884a8dbaa377e0179774d129b2c8f8982c09e74 Mon Sep 17 00:00:00 2001 From: "Bosheng (Daniel) Zhang" <740807262@qq.com> Date: Wed, 4 Oct 2023 15:53:39 +1000 Subject: [PATCH] Update client.py sleep_time typing for run_in_thread function 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 4923143543..e334bfb3f0 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":