diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 055e5f2..624d00a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.1 + rev: v1.11.2 hooks: - id: mypy - additional_dependencies: [types-all] + additional_dependencies: [flask, types-setuptools, types-pyyaml] diff --git a/git_code_debt/server/app.py b/git_code_debt/server/app.py index ca97bfa..a299af1 100644 --- a/git_code_debt/server/app.py +++ b/git_code_debt/server/app.py @@ -40,7 +40,7 @@ def before_request() -> None: @app.teardown_request -def teardown_request(_: Exception | None) -> None: +def teardown_request(_: object) -> None: flask.g.config = None flask.g.db.close() diff --git a/testing/utilities/client.py b/testing/utilities/client.py index 712b65b..3732835 100644 --- a/testing/utilities/client.py +++ b/testing/utilities/client.py @@ -1,7 +1,6 @@ from __future__ import annotations import json -from typing import TYPE_CHECKING import flask.testing import pyquery @@ -26,13 +25,7 @@ def json(self): return json.loads(self.text) -if TYPE_CHECKING: - ClientBase = flask.testing.FlaskClient[Response] -else: - ClientBase = flask.testing.FlaskClient - - -class Client(ClientBase): +class Client(flask.testing.FlaskClient): """A Client wraps the client given by flask to add other utilities.""" def open(self, *args, **kwargs):