Skip to content

Commit e51ba57

Browse files
committed
Fix mypy warning
1 parent c06df0b commit e51ba57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crytic_compile/platform/etherscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,15 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
376376
try:
377377
# etherscan might return an object with two curly braces, {{ content }}
378378
dict_source_code = json.loads(source_code[1:-1])
379+
assert isinstance(dict_source_code, dict)
379380
filenames, working_dir, remappings = _handle_multiple_files(
380381
dict_source_code, addr, prefix, contract_name, export_dir
381382
)
382383
except JSONDecodeError:
383384
try:
384385
# or etherscan might return an object with single curly braces, { content }
385386
dict_source_code = json.loads(source_code)
387+
assert isinstance(dict_source_code, dict)
386388
filenames, working_dir, remappings = _handle_multiple_files(
387389
dict_source_code, addr, prefix, contract_name, export_dir
388390
)

0 commit comments

Comments
 (0)