Update helpers.pyLoosen send_file type annotation to include t.IO[bytes] Include typing.IO[bytes] to align with Werkzeug and resolve issue #5776.

This commit is contained in:
Pouria-yvr 2025-08-05 17:31:06 -07:00 committed by GitHub
parent 85c5d93cbd
commit 45eb69f8ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -398,7 +398,7 @@ def _prepare_send_file_kwargs(**kwargs: t.Any) -> dict[str, t.Any]:
def send_file(
path_or_file: os.PathLike[t.AnyStr] | str | t.BinaryIO,
path_or_file: os.PathLike[t.AnyStr] | str | t.BinaryIO | t.IO[bytes],
mimetype: str | None = None,
as_attachment: bool = False,
download_name: str | None = None,