Fix mypy types in Hasheous _request and lookup_rom

Annotate request_kwargs as dict[str, Any] to accept the list json payload,
and file_hashes as dict[str, str | None] so the chd_sha1_hash branch and the
md5/sha1/crc branch unify cleanly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Georges-Antoine Assi
2026-06-09 07:54:33 -04:00
parent 650ab6925c
commit 08e8821b4b

View File

@@ -172,7 +172,7 @@ class HasheousHandler(MetadataHandler):
)
# Prepare request kwargs
request_kwargs = {
request_kwargs: dict[str, Any] = {
"url": url,
"params": params,
"headers": {
@@ -256,6 +256,7 @@ class HasheousHandler(MetadataHandler):
# against any of them.
data: list[dict] = []
for file in filtered_files:
file_hashes: dict[str, str | None]
if file.chd_sha1_hash:
# CHD files are indexed by disc-data SHA1 only
# Raw file MD5/CRC are hashes of the container and won't match