Skip to content

Commit

Permalink
lint, typing
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Jan 16, 2025
1 parent bc1e00a commit 9f16e04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/dipdup/dipdup.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,9 @@ async def _set_up_prometheus(self) -> None:

from prometheus_client import start_http_server

_logger.info('Setting up Prometheus at http://%s:%s', self._config.prometheus.host, self._config.prometheus.port)
_logger.info(
'Setting up Prometheus at http://%s:%s', self._config.prometheus.host, self._config.prometheus.port
)
start_http_server(self._config.prometheus.port, self._config.prometheus.host)

async def _set_up_api(self, stack: AsyncExitStack) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/dipdup/models/substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _SubstrateNodeEventResponse(TypedDict):
name: str
index: int
extrinsic_index: int
decoded_args: dict[str, Any]
decoded_args: dict[str, Any] | list[Any]


@dataclass(frozen=True, kw_only=True)
Expand All @@ -60,7 +60,7 @@ class SubstrateEventData(HasLevel):
extrinsic_index: int
call_address: list[str] | None
args: list[Any] | None = None
decoded_args: dict[str, Any] | None = None
decoded_args: dict[str, Any] | list[Any] | None = None
header: _BlockHeader
header_extra: _BlockHeaderExtra | None

Expand Down
4 changes: 1 addition & 3 deletions src/dipdup/runtimes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from contextlib import suppress
from copy import copy
from functools import cache
from functools import cached_property
Expand Down Expand Up @@ -154,7 +153,6 @@ def decode_event_args(
spec_version: str,
) -> dict[str, Any]:
from scalecodec.base import ScaleBytes
from scalecodec.exceptions import RemainingScaleBytesNotEmptyException # type: ignore[import-untyped]

spec_obj = self.get_spec_version(spec_version)
event_abi = spec_obj.get_event_abi(
Expand Down Expand Up @@ -194,7 +192,7 @@ def decode_event_args(
if type_.startswith('Vec<'):
value_len = len(value[2:]) * 2
value = f'0x{value_len:02x}{value[2:]}'

scale_obj = self.runtime_config.create_scale_object(
type_string=type_,
data=ScaleBytes(value),
Expand Down

0 comments on commit 9f16e04

Please sign in to comment.