Skip to content

Commit

Permalink
Update client.py sleep_time typing for run_in_thread function (#2977)
Browse files Browse the repository at this point in the history
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"`
  • Loading branch information
danielzhangau authored Oct 16, 2023
1 parent 14be2da commit d3a3ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit d3a3ada

Please sign in to comment.