File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ jobs:
149149 - name : Install runtime deps + mypy
150150 # Install from the pinned lock file for deterministic resolution,
151151 # then add mypy (dev-only; not in requirements-lock.txt).
152+ # Flask 3.1+ ships inline types — do not install types-Flask (conflicts).
152153 run : |
153154 python -m pip install --upgrade pip
154155 python -m pip install -r requirements-lock.txt
Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- from typing import Any , cast , overload
5+ from typing import Any , overload
66
77from flask import Response , current_app , jsonify
88
@@ -24,8 +24,9 @@ def json_response(
2424 data : Any ,
2525 status : int | None = None ,
2626) -> Response | tuple [Response , int ]:
27- """Typed wrapper around :func:`flask.jsonify` for strict mypy (types-Flask)."""
28- response = cast (Response , jsonify (data ))
27+ """Typed wrapper around :func:`flask.jsonify` for strict mypy."""
28+ response = jsonify (data )
29+ assert isinstance (response , Response )
2930 if status is None :
3031 return response
3132 return response , status
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ desktop = ["pywebview>=5.0,<6"]
3232dev = [
3333 " pytest>=8,<9" ,
3434 " mypy>=1.10,<2" ,
35- " types-Flask>=1.1,<2" ,
3635 " hypothesis>=6.100,<7" ,
3736]
3837
You can’t perform that action at this time.
0 commit comments