From 8a12b0713e9bb77d340f325cad2e1802d3729496 Mon Sep 17 00:00:00 2001 From: NotPeopling2day <32708219+NotPeopling2day@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:11:33 -0600 Subject: [PATCH] chore: more updates --- .pre-commit-config.yaml | 4 ++-- setup.py | 6 +++--- silverback/middlewares.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ba4bafd..e15dfcf4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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] diff --git a/setup.py b/setup.py index 2d28d03a..a06a7cce 100644 --- a/setup.py +++ b/setup.py @@ -10,8 +10,8 @@ "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 @@ -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", ], diff --git a/silverback/middlewares.py b/silverback/middlewares.py index 8d0e9d24..cf03c0a0 100644 --- a/silverback/middlewares.py +++ b/silverback/middlewares.py @@ -1,7 +1,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 @@ -66,7 +66,7 @@ def fix_dict(data: dict) -> dict: 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