Skip to content

Commit fb54bdd

Browse files
authored
Fix type hint annotations of expire time (#2361)
* fix typehint annotations of expire time. `ExpiryT` includes `float` type, but params of expiry-time (`ex`, `px`) for methods such as `set`, `expire`, `setnx`, etc. , should be `int`, not `float`. * add `IntExpiryT` annotation. * minor fix. * minor fix.
1 parent 2a0405d commit fb54bdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
DecodedT = Union[str, int, float]
1717
EncodableT = Union[EncodedT, DecodedT]
1818
AbsExpiryT = Union[int, datetime]
19-
ExpiryT = Union[float, timedelta]
19+
ExpiryT = Union[int, timedelta]
2020
ZScoreBoundT = Union[float, str] # str allows for the [ or ( prefix
2121
BitfieldOffsetT = Union[int, str] # str allows for #x syntax
2222
_StringLikeT = Union[bytes, str, memoryview]

0 commit comments

Comments
 (0)