From bbb65a9099f1be95a89c3ee4c7bf81f8c06f8dae Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 3 Mar 2026 16:48:00 -0600 Subject: [PATCH] =?UTF-8?q?store:=20PR=20review:=20paper-dynasty-database#?= =?UTF-8?q?43=20=E2=80=94=20FastAPI=20int=20type=20annotations=20on=20path?= =?UTF-8?q?=20params?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...base43-fastapi-int-type-annotati-07eb63.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 graph/workflows/pr-review-paper-dynasty-database43-fastapi-int-type-annotati-07eb63.md diff --git a/graph/workflows/pr-review-paper-dynasty-database43-fastapi-int-type-annotati-07eb63.md b/graph/workflows/pr-review-paper-dynasty-database43-fastapi-int-type-annotati-07eb63.md new file mode 100644 index 00000000000..7982d933a24 --- /dev/null +++ b/graph/workflows/pr-review-paper-dynasty-database43-fastapi-int-type-annotati-07eb63.md @@ -0,0 +1,31 @@ +--- +id: 07eb63c2-1823-4f26-b976-a725ea5ab324 +type: workflow +title: "PR review: paper-dynasty-database#43 — FastAPI int type annotations on path params" +tags: [pr-reviewer, paper-dynasty-database, fastapi, type-annotations, python, peewee] +importance: 0.4 +confidence: 0.8 +created: "2026-03-03T22:48:00.357115+00:00" +updated: "2026-03-03T22:48:00.357115+00:00" +--- + +## PR #43 Review — APPROVED + +**Repo**: cal/paper-dynasty-database +**Branch**: ai/paper-dynasty-database#27 → next-release +**Title**: fix: add type annotations to untyped path parameters (#27) + +### Changes Reviewed +- `app/routers_v2/packs.py:112` — `get_one_pack(pack_id: int, ...)` +- `app/routers_v2/players.py:590` — `get_one_player(player_id: int, ...)` +- `app/routers_v2/players.py:1122` — `delete_player(player_id: int, ...)` +- `app/routers_v2/teams.py:179` — `get_one_team(team_id: int, ...)` + +### Verdict: APPROVED (posted as COMMENT — Gitea blocks self-approval) + +All four changes are minimal, correct, and follow FastAPI conventions. Adding `: int` type hints to path parameters enables FastAPI's built-in validation (returns 422 on non-integer input) instead of letting string values reach the Peewee ORM and raise unhandled exceptions. Positive security improvement. + +### Notes +- No tests exist in this repo (expected) +- Suggestion filed: other routers (gauntlets, scouting) may have similar untyped path params worth fixing in a follow-up +- Gitea does not allow self-approval; reviewer must post as COMMENT when PR author == reviewer account