Skip to content

Commit c75737a

Browse files
author
Wizard1209
committed
fix linting
1 parent 965b2f3 commit c75737a

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/demo_evm_uniswap/models/token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def convert_token_amount(amount: int, decimals: int) -> Decimal:
5151

5252

5353
class ERC20Token:
54-
def __init__(self, address: ChecksumAddress, web3: AsyncWeb3):
54+
def __init__(self, address: ChecksumAddress, web3: AsyncWeb3): # type: ignore[type-arg]
5555
self.web3 = web3
5656
self.address = address
5757
self.contract = self.web3.eth.contract(
@@ -60,7 +60,7 @@ def __init__(self, address: ChecksumAddress, web3: AsyncWeb3):
6060
)
6161

6262
@classmethod
63-
def from_address(cls, web3: AsyncWeb3, token_address: str | bytes) -> 'ERC20Token':
63+
def from_address(cls, web3: AsyncWeb3, token_address: str | bytes) -> 'ERC20Token': # type: ignore[type-arg]
6464
address = to_checksum_address(token_address)
6565
return ERC20Token(address, web3)
6666

src/dipdup/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ async def schema(ctx: click.Context) -> None:
730730
Run `dipdup schema init` or `dipdup run` to the run the indexer and it'll be initialized automatically."""
731731
)
732732

733-
from aerich import Command as AerichCommand # type: ignore[import-untyped]
733+
from aerich import Command as AerichCommand
734734

735735
from dipdup.database import get_tortoise_config
736736

@@ -761,13 +761,13 @@ def wrapper(ctx: click.Context, /, *args: Any, **kwargs: Any) -> None:
761761
# NOTE: Saving 0.45s on imports and hiding from reference
762762
if 'schema' in sys.argv:
763763
try:
764-
from aerich.cli import cli as aerich_cli # type: ignore[import-untyped]
764+
from aerich.cli import cli as aerich_cli
765765

766-
schema.add_command(aerich_cli.commands['history'])
767-
schema.add_command(aerich_cli.commands['heads'])
768-
schema.add_command(aerich_cli.commands['migrate'])
769-
schema.add_command(_approve_schema_after(aerich_cli.commands['upgrade']))
770-
schema.add_command(_approve_schema_after(aerich_cli.commands['downgrade']))
766+
schema.add_command(aerich_cli.commands['history']) # type: ignore
767+
schema.add_command(aerich_cli.commands['heads']) # type: ignore
768+
schema.add_command(aerich_cli.commands['migrate']) # type: ignore
769+
schema.add_command(_approve_schema_after(aerich_cli.commands['upgrade'])) # type: ignore
770+
schema.add_command(_approve_schema_after(aerich_cli.commands['downgrade'])) # type: ignore
771771
except ImportError:
772772
_logger.debug('aerich is not installed, skipping database migration commands')
773773

src/dipdup/datasources/_web3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from dipdup.datasources.evm_node import EvmNodeDatasource
1111

1212

13-
async def create_web3_client(datasource: 'EvmNodeDatasource') -> 'AsyncWeb3':
13+
async def create_web3_client(datasource: 'EvmNodeDatasource') -> 'AsyncWeb3': # type: ignore[type-arg]
1414
from web3 import AsyncWeb3
1515
from web3.providers.async_base import AsyncJSONBaseProvider
1616

src/dipdup/datasources/evm_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class EvmNodeDatasource(JsonRpcDatasource[EvmNodeDatasourceConfig]):
7474

7575
def __init__(self, config: EvmNodeDatasourceConfig, merge_subscriptions: bool = False) -> None:
7676
super().__init__(config)
77-
self._web3_client: AsyncWeb3 | None = None
77+
self._web3_client: AsyncWeb3 | None = None # type: ignore[type-arg]
7878
self._ws_client: WebsocketTransport | None = None
7979
self._requests: dict[str, tuple[asyncio.Event, Any]] = {}
8080
self._subscription_ids: dict[str, EvmNodeSubscription] = {}
@@ -88,7 +88,7 @@ def __init__(self, config: EvmNodeDatasourceConfig, merge_subscriptions: bool =
8888
self._on_syncing_callbacks: set[SyncingCallback] = set()
8989

9090
@property
91-
def web3(self) -> 'AsyncWeb3':
91+
def web3(self) -> 'AsyncWeb3': # type: ignore[type-arg]
9292
if not self._web3_client:
9393
raise FrameworkException('web3 client is not initialized; is datasource running?')
9494
return self._web3_client

src/dipdup/dipdup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ async def _initialize_migrations(self) -> None:
10361036

10371037
migrations_dir = self._ctx.package.migrations
10381038
try:
1039-
from aerich import Command as AerichCommand # type: ignore[import-untyped]
1039+
from aerich import Command as AerichCommand
10401040

10411041
tortoise_config = get_tortoise_config(self._config.database.connection_string, self._config.package)
10421042
aerich_command = AerichCommand(

0 commit comments

Comments
 (0)