Fixing mypy and ruff errors.

This commit is contained in:
2026-03-16 16:43:45 -07:00
parent d049b404c2
commit e9cbc83623
2 changed files with 7 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ readme = "README.md"
packages = [{include = "src"}]
[tool.poetry.dependencies]
python = "^3.12.3"
python = "^3.12"
flask = "^3.0"
[tool.poetry.group.dev.dependencies]
@@ -49,7 +49,7 @@ known-first-party = ["src"]
# ── Mypy ───────────────────────────────────────────────────────────────────
[tool.mypy]
python_version = "3.12.3"
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true

View File

@@ -1,16 +1,17 @@
from flask import Flask, jsonify
from datetime import datetime, timezone
from datetime import UTC, datetime
from flask import Flask, Response, jsonify
app = Flask(__name__)
@app.get("/heartbeat")
def heartbeat() -> tuple:
def heartbeat() -> tuple[Response, int]:
return (
jsonify(
{
"status": "ok",
"timestamp": datetime.now(timezone.utc).isoformat(),
"timestamp": datetime.now(UTC).isoformat(),
}
),
200,