Repository navigation
Conversation
## Summary Fixes #3673. The prose gate picks an extensionless file's lexer from the program its shebang names. `#!/usr/bin/env -S uv run --script` names `uv`, which Pygments has no lexer for. So the file fell back to `bash` and missed every Python reading, including the PEP 723 metadata block exemption from #3634. - `prose-gate.json` gains `files.runner`, which maps a runner program to the interpreter it runs: `{ "uv": "python" }`. - `lexer_name` looks up the shebang's program in that map before it asks Pygments. - Tests: four `uv` shebang forms select `python`, with and without `-S` and `--script`. An extensionless `tool` holding a PEP 723 block reports no `comment-added`. The file-mapping test now also checks that each `runner` value names a declared language. Both new tests fail when the lookup is removed. The 644 prose-lint tests pass, and so do ruff, mypy, the prose gate, and the eol gate. ## Local review Two `local-strict-review` passes ran at the `frontier` tier. The first raised one `introduced` finding: the mapping test did not cover the new map. That was fixed in 5ac8f52. The second pass over the full diff raised nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the uv shebang-to-Python mapping and its associated lexer and metadata-block handling changes.
No open issues 🎉
What changed in this PR
This pull request promotes the prose-gate fix that recognizes extensionless Python scripts launched through uv run, enabling Python-specific handling such as PEP 723 metadata-block exemptions.
Changes:
- Adds a
uvrunner-to-pythonmapping to the prose-gate configuration. - Resolves configured runners before selecting the Pygments lexer from a shebang.
- Adds regression coverage for supported
uvshebang forms and metadata blocks.
| File | Description |
|---|---|
tests/test_prose_lint.py |
Tests uv shebang resolution, metadata-block handling, and runner mapping validation. |
.github/actions/prose-gate/prose-gate.json |
Declares that uv runs Python files. |
.github/actions/prose-gate/prose_lint.py |
Applies runner mappings during shebang-based lexer selection. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3678 +/- ##
=======================================
Coverage 81.72% 81.72%
=======================================
Files 27 27
Lines 9128 9128
=======================================
Hits 7460 7460
Misses 1668 1668
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…on an Attested Head (#3681) Promotes the changes merged into `develop` since promotion #3678 to `main`. - [#3680](#3680) Ends `pr_review.py wait`'s held poll on an attested head when an unresolved review thread is open, with a new exit `46` and a `status=THREADS_UNRESOLVED` line naming the threads' authors. The poll's read now carries each thread's state and author, and a thread read cut at 100 is walked to its end first. - [#3682](#3682) Walks a cut thread page once per poll read, keeping the answer on the payload it judged, which answers this promotion's first Copilot round. Closes #3671 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Promotes the changes merged into
developsince promotion #3675 tomain.uv runshebang as Python in the prose gate. A newfiles.runnermap in the gate's data names the interpreter a runner runs, so an extensionlessuv run --scriptfile gets the Python reading, the PEP 723 metadata block exemption among it.Closes #3673
🤖 Generated with Claude Code