Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #266

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 1 addition & 1 deletion git_code_debt/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
9 changes: 1 addition & 8 deletions testing/utilities/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import json
from typing import TYPE_CHECKING

import flask.testing
import pyquery
Expand All @@ -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):
Expand Down
Loading