Skip to content

Commit

Permalink
Comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hweawer committed Sep 5, 2024
1 parent 9341074 commit dcce2f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ markers = [
"unit", # offline
"integration", # hardhat fork
"integration_holesky", # holesky fork
"integration_chiado" # chiado(gnosis testnet) run only
"integration_chiado", # chiado(gnosis testnet) run only
]

[tool.ruff]
Expand Down
2 changes: 1 addition & 1 deletion src/blockchain/contracts/data_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def send_message(self, event_id: bytes, mes: bytes) -> ContractFunction:
Build send message transaction to Data Bus contract
"""
tx = self.functions.send_message(event_id, mes)
logger.info({'msg': 'Build `send_message(...)` tx.'})
logger.info({'msg': f'Build `send_message({event_id.hex()}, {mes.hex()})` tx.'})
return tx
6 changes: 3 additions & 3 deletions src/transport/msg_providers/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import abc
import logging
from typing import Any, List, Optional
from typing import Any, Optional

from schema import Schema, SchemaError

Expand All @@ -15,7 +15,7 @@ class BaseMessageProvider(abc.ABC):
def __init__(self, message_schema: Schema):
self.message_schema = message_schema

def get_messages(self) -> List[dict]:
def get_messages(self) -> list[dict]:
"""
Fetches new messages, processes them, and filters out only the valid ones.
Expand All @@ -25,7 +25,7 @@ def get_messages(self) -> List[dict]:
return [msg for msg in (self._process_msg(m) for m in self._fetch_messages()) if msg and self._is_valid(msg)]

@abc.abstractmethod
def _fetch_messages(self) -> List[Any]:
def _fetch_messages(self) -> list[Any]:
raise NotImplementedError('Receive message from transport.')

def _process_msg(self, msg: Any) -> Optional[dict]:
Expand Down

0 comments on commit dcce2f9

Please sign in to comment.