Skip to content

Commit

Permalink
fix: circ import
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Nov 8, 2024
1 parent 489e442 commit 316ca63
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions evmspec/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
from decimal import Decimal
from enum import Enum
from functools import cached_property
from typing import Any, Callable, Tuple, Type, TypeVar
from typing import TYPE_CHECKING, Any, Callable, Tuple, Type, TypeVar

from cachetools.func import ttl_cache
from eth_utils import to_checksum_address
from hexbytes import HexBytes
from msgspec import json
from typing_extensions import Self

from evmspec.log import Log
if TYPE_CHECKING:
from evmspec.log import Log

_T = TypeVar("_T")
_DecodeHook = Callable[[Type[_T], Any], _T]
Expand Down Expand Up @@ -178,7 +179,7 @@ async def get_receipt(
)

@a_sync # TODO; compare how these type check, they both function the same
async def get_logs(self) -> Tuple[Log, ...]:
async def get_logs(self) -> Tuple["Log", ...]:
try:
import dank_mids
except ImportError:
Expand All @@ -187,7 +188,7 @@ async def get_logs(self) -> Tuple[Log, ...]:
)

receipt = await dank_mids.eth._get_transaction_receipt_raw(self)
return json.decode(receipt, type=Tuple[Log, ...], dec_hook=_decode_hook)
return json.decode(receipt, type=Tuple["Log", ...], dec_hook=_decode_hook)

except ImportError:
pass
Expand Down

0 comments on commit 316ca63

Please sign in to comment.