mirror of https://github.com/scrapy/scrapy.git
Bump typing deps.
This commit is contained in:
parent
2e214210f6
commit
de146ad7ce
|
|
@ -370,12 +370,11 @@ class FilesystemCacheStorage:
|
|||
with self._open(rpath / "pickled_meta", "wb") as f:
|
||||
pickle.dump(metadata, f, protocol=4)
|
||||
with self._open(rpath / "response_headers", "wb") as f:
|
||||
# headers_dict_to_raw() needs a better type hint
|
||||
f.write(cast(bytes, headers_dict_to_raw(response.headers)))
|
||||
f.write(headers_dict_to_raw(response.headers))
|
||||
with self._open(rpath / "response_body", "wb") as f:
|
||||
f.write(response.body)
|
||||
with self._open(rpath / "request_headers", "wb") as f:
|
||||
f.write(cast(bytes, headers_dict_to_raw(request.headers)))
|
||||
f.write(headers_dict_to_raw(request.headers))
|
||||
with self._open(rpath / "request_body", "wb") as f:
|
||||
f.write(request.body)
|
||||
|
||||
|
|
|
|||
|
|
@ -118,8 +118,7 @@ class Headers(CaselessDict):
|
|||
]
|
||||
|
||||
def to_string(self) -> bytes:
|
||||
# cast() can be removed if the headers_dict_to_raw() hint is improved
|
||||
return cast(bytes, headers_dict_to_raw(self))
|
||||
return headers_dict_to_raw(self)
|
||||
|
||||
def to_unicode_dict(self) -> CaseInsensitiveDict:
|
||||
"""Return headers as a CaseInsensitiveDict with str keys
|
||||
|
|
|
|||
9
tox.ini
9
tox.ini
|
|
@ -47,18 +47,17 @@ install_command =
|
|||
basepython = python3
|
||||
deps =
|
||||
mypy==1.10.0
|
||||
typing-extensions==4.11.0
|
||||
typing-extensions==4.12.1
|
||||
types-lxml==2024.4.14
|
||||
types-Pygments==2.18.0.20240506
|
||||
types-pyOpenSSL==24.1.0.20240425
|
||||
types-setuptools==69.5.0.20240518
|
||||
types-setuptools==70.0.0.20240524
|
||||
botocore-stubs==1.34.94
|
||||
boto3-stubs[s3]==1.34.108
|
||||
boto3-stubs[s3]==1.34.119
|
||||
attrs >= 18.2.0
|
||||
Pillow >= 10.3.0
|
||||
pytest >= 8.2.0
|
||||
# 2.1.2 fixes a typing bug: https://github.com/scrapy/w3lib/pull/211
|
||||
w3lib >= 2.1.2
|
||||
w3lib >= 2.2.0
|
||||
commands =
|
||||
mypy {posargs: scrapy tests}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue