docs: widen FileContent to include bytearray (dpycache-3)

_normalize and _to_file both already accept bytearray at runtime
(isinstance((bytes, bytearray)), bytes(source) coercion in the dict path),
but the FileContent Union only listed bytes - a typed consumer passing a
bytearray gets spurious mypy arg-type/dict-item errors for input the code
genuinely handles. Widen the Union to match actual behavior.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-07-06 00:17:48 -04:00
parent c670ab952e
commit 7a1ab625fa
+1 -1
View File
@@ -61,7 +61,7 @@ log = logging.getLogger(__name__)
MAX_ATTACHMENTS_PER_MESSAGE = 10
FileContent = Union[bytes, str, "os.PathLike[str]", discord.File]
FileContent = Union[bytes, bytearray, str, "os.PathLike[str]", discord.File]
class DPYCacheError(Exception):