Prompt file imported from Cataldir/governed-second-brain (
.github/prompts/python-review.prompt.md). Copyright stays with the author.
Review the specified Python code checking for:
- Type Completeness — All public functions have full signatures. No bare
Anywithout justification. - Async Correctness — No blocking calls inside async functions. Proper TaskGroup/gather usage. No fire-and-forget tasks.
- Security — OWASP Top 10 compliance. Parameterized queries. No secrets in code. Pydantic validation at boundaries.
- Error Handling — Specific exception types. No bare
except:. Proper cleanup in finally blocks. - Code Smells — Long methods, feature envy, shotgun surgery. Flag refactoring candidates with technique recommendations.
- Test Quality — Coverage of edge cases. Proper mocking boundaries. No testing implementation details.
Provide findings as a prioritized list with file locations, severity (critical/warning/info), and fix recommendations.