From ffd9ef2357a7354aca5f462844143aa262d35f3a Mon Sep 17 00:00:00 2001 From: antazoey Date: Tue, 23 Jul 2024 15:03:24 -0500 Subject: [PATCH] chore: handle 1.11 mypy upgrades (#2184) --- .pre-commit-config.yaml | 2 +- setup.py | 2 +- src/ape/utils/basemodel.py | 2 +- src/ape_run/_cli.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1004cfbdf..2b98f5abcf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.1 + rev: v1.11.0 hooks: - id: mypy additional_dependencies: [ diff --git a/setup.py b/setup.py index c8497a0c68..a05def41b4 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ ], "lint": [ "black>=24.4.2,<25", # Auto-formatter and linter - "mypy>=1.10.1,<2", # Static type analyzer + "mypy>=1.11.0,<2", # Static type analyzer "types-PyYAML", # Needed due to mypy typeshed "types-requests", # Needed due to mypy typeshed "types-setuptools", # Needed due to mypy typeshed diff --git a/src/ape/utils/basemodel.py b/src/ape/utils/basemodel.py index 54f0e2d65b..0b15e2344a 100644 --- a/src/ape/utils/basemodel.py +++ b/src/ape/utils/basemodel.py @@ -201,7 +201,7 @@ def __getattr__(self, item): def __getitem__(self, item): return self._callback(item) - def get(self, item): + def get(self, item): # type: ignore[override] return self._callback(item) diff --git a/src/ape_run/_cli.py b/src/ape_run/_cli.py index 384903e7c2..1e7e2b4cd2 100644 --- a/src/ape_run/_cli.py +++ b/src/ape_run/_cli.py @@ -213,7 +213,7 @@ def get_command(self, ctx, name): # NOTE: don't return anything so Click displays proper error - def result_callback(self, result, interactive): + def result_callback(self, result, interactive: bool): # type: ignore[override] if interactive: return self._launch_console()