Skip to content

Commit

Permalink
chore: more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
NotPeopling2day authored and fubuloubu committed Dec 20, 2023
1 parent 9239778 commit c2f8cd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.12.0
hooks:
- id: black
name: black
Expand All @@ -21,7 +21,7 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
rev: v1.7.1
hooks:
- id: mypy
additional_dependencies: [types-setuptools, pydantic]
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
extras_require = {
"test": [ # `test` GitHub Action jobs uses this
"pytest>=6.0", # Core testing package
"pytest-xdist", # multi-process runner
"pytest-xdist", # Multi-process runner
"pytest-cov", # Coverage analyzer plugin
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
],
"lint": [
"black>=23.11.0,<24", # Auto-formatter and linter
"mypy>=1.7.0,<2", # Static type analyzer
"black>=23.12.0,<24", # Auto-formatter and linter
"mypy>=1.7.1,<2", # Static type analyzer
"types-setuptools", # Needed for mypy type shed
"flake8>=6.1.0,<7", # Style linter
"isort>=5.10.1,<6", # Import sorting linter
Expand Down Expand Up @@ -69,7 +69,7 @@
install_requires=[
"click", # Use same version as eth-ape
"eth-ape>=0.7.0,<1.0",
"ethpm_types", # Use same version as eth-ape
"eth-pydantic-types", # Use same version as eth-ape
"pydantic_settings", # Use same version as eth-ape
"taskiq[metrics]>=0.6.0,<0.7.0",
],
Expand Down
4 changes: 2 additions & 2 deletions silverback/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ape.logging import logger
from ape.types import ContractLog
from ape.utils import ManagerAccessMixin
from ethpm_types import HexBytes
from eth_pydantic_types import HexBytes
from taskiq import TaskiqMessage, TaskiqMiddleware, TaskiqResult

from silverback.persistence import HandlerResult
Expand Down Expand Up @@ -83,7 +83,7 @@ def pre_execute(self, message: TaskiqMessage) -> TaskiqMessage:

elif "event" in message.task_name:
# NOTE: Just in case the user doesn't specify type as `ContractLog`
message.args[0] = ContractLog.parse_obj(message.args[0])
message.args[0] = ContractLog.model_validate(message.args[0])

logger.info(f"{self._create_label(message)} - Started")
return message
Expand Down

0 comments on commit c2f8cd9

Please sign in to comment.