mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user