mirror of https://github.com/CIRCL/lookyloo
chg: make mypy happy
parent
8f4040b806
commit
5e33ad6d0b
|
@ -753,7 +753,7 @@ class Lookyloo():
|
||||||
with hashlookup_file.open() as f:
|
with hashlookup_file.open() as f:
|
||||||
hashlookup_entries = json.load(f)
|
hashlookup_entries = json.load(f)
|
||||||
|
|
||||||
to_return = defaultdict(dict)
|
to_return: Dict[str, Dict[str, Any]] = defaultdict(dict)
|
||||||
|
|
||||||
for sha1 in hashlookup_entries.keys():
|
for sha1 in hashlookup_entries.keys():
|
||||||
to_return[sha1]['nodes'] = hashes_tree[sha1]
|
to_return[sha1]['nodes'] = hashes_tree[sha1]
|
||||||
|
|
|
@ -57,8 +57,8 @@ class HashlookupModule():
|
||||||
if not self.available:
|
if not self.available:
|
||||||
raise ConfigError('Hashlookup not available, probably not enabled.')
|
raise ConfigError('Hashlookup not available, probably not enabled.')
|
||||||
|
|
||||||
to_return = {}
|
to_return: Dict[str, Dict[str, str]] = {}
|
||||||
for entry in self.client.sha1_bulk_lookup(hashes):
|
for entry in self.client.sha1_bulk_lookup(hashes):
|
||||||
if 'SHA-1' in entry:
|
if 'SHA-1' in entry and isinstance(entry['SHA-1'], str):
|
||||||
to_return[entry['SHA-1'].lower()] = entry
|
to_return[entry['SHA-1'].lower()] = entry # type: ignore
|
||||||
return to_return
|
return to_return
|
||||||
|
|
Loading…
Reference in New Issue