We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 36ae903 + 200d6c2 commit 018a1faCopy full SHA for 018a1fa
src/zimscraperlib/download.py
@@ -2,6 +2,8 @@
2
# -*- coding: utf-8 -*-
3
# vim: ai ts=4 sts=4 et sw=4 nu
4
5
+from __future__ import annotations
6
+
7
import io
8
import pathlib
9
import subprocess
@@ -174,7 +176,7 @@ def stream_file(
174
176
max_retries: Optional[int] = 5,
175
177
headers: Optional[Dict[str, str]] = None,
178
session: Optional[requests.Session] = None,
-) -> Union[int, requests.structures.CaseInsensitiveDict]:
179
+) -> tuple[int, requests.structures.CaseInsensitiveDict]:
180
"""Stream data from a URL to either a BytesIO object or a file
181
Arguments -
182
fpath - Path of the file where data is sent
0 commit comments