Skip to content

Commit

Permalink
Merge pull request #266 from asottile/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
asottile authored Aug 27, 2024
2 parents b3e2245 + c59c960 commit bcd4676
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
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

0 comments on commit bcd4676

Please sign in to comment.