fix: remove debug print(req.scope) from get_docs route (#31) #32
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#32
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-database#31"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Removes the debug
print(req.scope)statement from theget_docsroute (app/main.py:56) that was logging the full ASGI request scope to stdout on every/api/docspage load.Changes
app/main.py: Removedprint(req.scope)from theget_docsfunctionNote: A linter auto-reformatted the file on save (import formatting, single→double quotes, trailing commas). The functional change is solely the removal of the print statement.
Test Results
No test suite — verified by reading back the modified file. The
/api/docsroute still functions correctly; only the debug output is removed.Closes #31
AI Code Review
Files Reviewed
app/main.py(modified)Findings
Correctness
print(req.scope)is removed fromget_docs. The surroundingget_swagger_ui_htmlcall is preserved and reformatted correctly — no behavioral change.Security
Authorizationtokens. Removing theprinteliminates the risk of those values appearing in stdout/Docker logs on every/api/docsload.Style & Conventions
Suggestions
f"0.1.1"in theopenapi()function is an f-string with no interpolation — could be a plain string, but this predates this PR.Verdict: APPROVED
Clean, targeted removal of a debug statement that had no place in production. The linter reformatting is harmless. No issues to block merging.
Automated review by Claude PR Reviewer
PR opened: #34
Removed the
print(req.scope)debug statement from theget_docsfunction inapp/main.py. The linter auto-reformatted on save (import formatting, single→double quotes, trailing commas) — functional change is solely the print removal.