We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a955ab0 commit 05b95c9Copy full SHA for 05b95c9
src/zimscraperlib/download.py
@@ -3,11 +3,10 @@
3
4
from __future__ import annotations
5
6
-import io
7
import pathlib
8
import subprocess
9
from concurrent.futures import Future, ThreadPoolExecutor
10
-from typing import ClassVar
+from typing import IO, ClassVar
11
12
import requests
13
import yt_dlp as youtube_dl
@@ -174,7 +173,7 @@ def get_session(max_retries: int | None = 5) -> requests.Session:
174
173
def stream_file(
175
url: str,
176
fpath: pathlib.Path | None = None,
177
- byte_stream: io.BytesIO | None = None,
+ byte_stream: IO[bytes] | None = None,
178
block_size: int | None = 1024,
179
proxies: dict | None = None,
180
only_first_block: bool | None = False, # noqa: FBT002
0 commit comments