Skip to content

Commit d5153ad

Browse files
Fix mypy CI errors in json_ok and export_api send_file stubs
1 parent a38b162 commit d5153ad

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

api/_flask_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Shared Flask handler return types for mypy."""
22

3-
from typing import Any, Union, cast
3+
from typing import Any, Union
44

55
from flask import Response, jsonify
66

@@ -9,4 +9,4 @@
99

1010
def json_ok(*args: Any, **kwargs: Any) -> Response:
1111
"""Typed wrapper around :func:`flask.jsonify`."""
12-
return cast(Response, jsonify(*args, **kwargs))
12+
return jsonify(*args, **kwargs)

api/export_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def bulk_export() -> FlaskReturn:
255255
buf,
256256
mimetype="application/zip",
257257
as_attachment=True,
258-
download_name=f"claude-code-export{suffix}-{date_tag}.zip", # type: ignore[call-arg]
258+
download_name=f"claude-code-export{suffix}-{date_tag}.zip",
259259
)
260260

261261

@@ -293,7 +293,7 @@ def export_session(project_name: str, session_id: str) -> FlaskReturn:
293293
buf,
294294
mimetype="application/json",
295295
as_attachment=True,
296-
download_name=f"{title_slug}.json", # type: ignore[call-arg]
296+
download_name=f"{title_slug}.json",
297297
)
298298

299299
md = session_to_markdown(session, stats)
@@ -303,7 +303,7 @@ def export_session(project_name: str, session_id: str) -> FlaskReturn:
303303
buf,
304304
mimetype="text/markdown",
305305
as_attachment=True,
306-
download_name=f"{title_slug}.md", # type: ignore[call-arg]
306+
download_name=f"{title_slug}.md",
307307
)
308308
except Exception:
309309
current_app.logger.exception(

0 commit comments

Comments
 (0)