Skip to content

Commit a5a337e

Browse files
committed
fix(Typing): add extra condition for mypy
1 parent bbc689d commit a5a337e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

evm_trace/vmtrace.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def to_trace_frames(
142142
if op.op in ["CALL", "DELEGATECALL", "STATICCALL"]:
143143
call_address_from_stack = stack.values[-2]
144144
# Evm natively discards dirty upper bits during CALL
145-
if len(call_address_from_stack) > 20:
145+
# NOTE: `isinstance` check to satisfy mypy
146+
if isinstance(call_address_from_stack, bytes) and len(call_address_from_stack) > 20:
146147
call_address_from_stack = call_address_from_stack[-20:]
147148
call_address = Address.__eth_pydantic_validate__(call_address_from_stack)
148149

0 commit comments

Comments
 (0)