Skip to content

Commit

Permalink
chore: flake8 type check
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 29, 2024
1 parent cb393d5 commit 73f0093
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions ape_tokens/managers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from ape.contracts import ContractInstance
from typing import TYPE_CHECKING

from ape.exceptions import ContractNotFoundError
from ape.types import ContractType
from ape.utils import ManagerAccessMixin, cached_property
from eth_utils import to_checksum_address
from tokenlists import TokenListManager

if TYPE_CHECKING:
from ape.contracts import ContractInstance

ERC20 = ContractType.model_validate(
{
"contractName": "ERC20",
Expand Down Expand Up @@ -114,7 +118,7 @@ def _manager(self) -> TokenListManager:
def __repr__(self) -> str:
return f"<ape_tokens.TokenManager default='{self._manager.default_tokenlist}'>"

def __getitem__(self, symbol: str) -> ContractInstance:
def __getitem__(self, symbol: str) -> "ContractInstance":
try:
token_info = self._manager.get_token_info(
symbol, chain_id=self.network_manager.network.chain_id
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[flake8]
max-line-length = 100
ignore = E704,W503,PYD002
ignore = E704,W503,PYD002,TC003,TC006
exclude =
venv*
.tox
docs
build
type-checking-pydantic-enabled = True

0 comments on commit 73f0093

Please sign in to comment.