You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report a Python File the Prose Gate Cannot Parse Instead of Skipping It #2163
bugSomething isn't workingpre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsproseA defect in rule or procedure text
The prose gate's Python checks pass silently when the interpreter running prose_lint.py cannot parse a file that the repository's own interpreter can. .github/actions/prose-gate/prose_lint.py returns {} from its docstring extraction on a SyntaxError (around line 2180), so the docstring checks skip that file, and python_comments returns None (around line 1770), so its caller falls back to regex comment extraction. The gate then reports a pass with less coverage rather than failing.
Every local surface runs the gate on a host interpreter rather than the repository's own: the Husky snippet runs py -3 or python3, and the VS Code "Lint: Prose" task and the pre-commit snippet run uv run --no-project python, which ignores the repository's requires-python. A repository whose requires-python sits above that interpreter, and whose code uses newer syntax, such as a PEP 695 type statement read by Python 3.11, reaches the silent skip. For example, a constructed file holding type Alias = int above a function with a docstring, read by a 3.11 interpreter, gets no docstring check at all.
Done
A Python file the gate cannot parse is reported rather than skipped, or the gate states in its scope line that it skipped the file's AST-based checks, so a pass under a mismatched interpreter is distinguishable from a clean one.
Found by the local strict review of the #2148 fix (handoff #2162). The finding is on code that change did not touch.
bugSomething isn't workingpre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsproseA defect in rule or procedure text
Activity
Pass --no-project to the Pre-Commit Snippet's uv run Hooks (#2164)
Name a Python File the Prose Gate Cannot Parse in Its Scope Line (#2797)