Skip to content

Commit c59c960

Browse files
committed
specify typed dependencies
1 parent edc083d commit c59c960

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ repos:
3939
rev: v1.11.2
4040
hooks:
4141
- id: mypy
42-
additional_dependencies: [types-all]
42+
additional_dependencies: [flask, types-setuptools, types-pyyaml]

git_code_debt/server/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def before_request() -> None:
4040

4141

4242
@app.teardown_request
43-
def teardown_request(_: Exception | None) -> None:
43+
def teardown_request(_: object) -> None:
4444
flask.g.config = None
4545
flask.g.db.close()
4646

testing/utilities/client.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import json
4-
from typing import TYPE_CHECKING
54

65
import flask.testing
76
import pyquery
@@ -26,13 +25,7 @@ def json(self):
2625
return json.loads(self.text)
2726

2827

29-
if TYPE_CHECKING:
30-
ClientBase = flask.testing.FlaskClient[Response]
31-
else:
32-
ClientBase = flask.testing.FlaskClient
33-
34-
35-
class Client(ClientBase):
28+
class Client(flask.testing.FlaskClient):
3629
"""A Client wraps the client given by flask to add other utilities."""
3730

3831
def open(self, *args, **kwargs):

0 commit comments

Comments
 (0)