diff options
author | Lee <leven.cn@gmail.com> | 2022-08-30 07:06:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 02:06:37 +0300 |
commit | fb54bddae9d460e227bfff77724e066b4a0ca522 (patch) | |
tree | 154f9b2198c562bf6a0b816c2a87110c019fb081 | |
parent | 2a0405d07e20ac7f695ff67415ad6c8368fd6066 (diff) | |
download | redis-py-fb54bddae9d460e227bfff77724e066b4a0ca522.tar.gz |
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.
-rw-r--r-- | redis/typing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/typing.py b/redis/typing.py index b572b0c..8504c7d 100644 --- a/redis/typing.py +++ b/redis/typing.py @@ -16,7 +16,7 @@ EncodedT = Union[bytes, memoryview] DecodedT = Union[str, int, float] EncodableT = Union[EncodedT, DecodedT] AbsExpiryT = Union[int, datetime] -ExpiryT = Union[float, timedelta] +ExpiryT = Union[int, timedelta] ZScoreBoundT = Union[float, str] # str allows for the [ or ( prefix BitfieldOffsetT = Union[int, str] # str allows for #x syntax _StringLikeT = Union[bytes, str, memoryview] |