Skip to content

Commit d25a96b

Browse files
TheKevJamesdvora-h
andauthored
Fix type hint for retry_on_error in async cluster (redis#2804)
* fix(asyncio.cluster): fixup retry_on_error type hint This parameter accepts a list of _classes of Exceptions_, not a list of instantiated Exceptions. Fixup the type hint accordingly. * chore: update changelog --------- Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
1 parent 40a769e commit d25a96b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Fix incorrect redis.asyncio.Cluster type hint for `retry_on_error`
12
* Fix dead weakref in sentinel connection causing ReferenceError (#2767)
23
* Fix #2768, Fix KeyError: 'first-entry' in parse_xinfo_stream.
34
* Fix #2749, remove unnecessary __del__ logic to close connections.

redis/asyncio/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def __init__(
249249
socket_keepalive_options: Optional[Mapping[int, Union[int, bytes]]] = None,
250250
socket_timeout: Optional[float] = None,
251251
retry: Optional["Retry"] = None,
252-
retry_on_error: Optional[List[Exception]] = None,
252+
retry_on_error: Optional[List[Type[Exception]]] = None,
253253
# SSL related kwargs
254254
ssl: bool = False,
255255
ssl_ca_certs: Optional[str] = None,

0 commit comments

Comments
 (0)