From 794bef00640dc5cef1a7cc04c3a87a5f35e52513 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Wed, 1 Jan 2025 16:07:19 -0800 Subject: [PATCH] Expand type for EncodedT As of PEP 688, type checkers will no longer implicitly consider bytearray to be compatible with bytes --- redis/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/typing.py b/redis/typing.py index b4d442c444..24ad607480 100644 --- a/redis/typing.py +++ b/redis/typing.py @@ -20,7 +20,7 @@ Number = Union[int, float] -EncodedT = Union[bytes, memoryview] +EncodedT = Union[bytes, bytearray, memoryview] DecodedT = Union[str, int, float] EncodableT = Union[EncodedT, DecodedT] AbsExpiryT = Union[int, datetime]