Skip to content

Commit

Permalink
specify typed dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Aug 27, 2024
1 parent edc083d commit c59c960
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ repos:
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 c59c960

Please sign in to comment.