Skip to content

Commit e89899c

Browse files
authored
Merge pull request #213 from openzim/small_changes
Small changes for mindtouch
2 parents 7b41b04 + f5f0412 commit e89899c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/zimscraperlib/download.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ def stream_file(
177177
fpath: pathlib.Path | None = None,
178178
byte_stream: IO[bytes] | None = None,
179179
block_size: int | None = 1024,
180-
proxies: dict | None = None,
180+
proxies: dict[str, str] | None = None,
181181
max_retries: int | None = 5,
182182
headers: dict[str, str] | None = None,
183183
session: requests.Session | None = None,
184184
*,
185185
only_first_block: bool | None = False,
186-
) -> tuple[int, requests.structures.CaseInsensitiveDict]:
186+
) -> tuple[int, requests.structures.CaseInsensitiveDict[str]]:
187187
"""Stream data from a URL to either a BytesIO object or a file
188188
Arguments -
189189
fpath - Path of the file where data is sent

src/zimscraperlib/logging.py

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
from zimscraperlib.constants import NAME
1414

1515
DEFAULT_FORMAT = "[%(name)s::%(asctime)s] %(levelname)s:%(message)s"
16+
DEFAULT_FORMAT_WITH_THREADS = (
17+
"[%(name)s::%(threadName)s::%(asctime)s] %(levelname)s:%(message)s"
18+
)
1619
VERBOSE_DEPENDENCIES = ["urllib3", "PIL", "boto3", "botocore", "s3transfer"]
1720

1821

0 commit comments

Comments
 (0)