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:
@@ -61,7 +61,7 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
MAX_ATTACHMENTS_PER_MESSAGE = 10
|
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):
|
class DPYCacheError(Exception):
|
||||||
|
|||||||
Reference in New Issue
Block a user