Skip to content

Pass --no-project to the Pre-Commit Snippet's uv run Hooks - #2164

Merged
ptr727 merged 1 commit into
developfrom
feature/auto-2148
Sep 30, 2026
Merged

ptr727 merged 1 commit into
developfrom
feature/auto-2148

Conversation

@ptr727

@ptr727 ptr727 commented Sep 30, 2026

Copy link
Copy Markdown
Owner

The pre-commit snippet ran its prose and EOL hooks as a project-scoped uv run, which writes a uv.lock in a directory whose pyproject.toml has none. Committed, that lock reclassifies a lint-only or pip-form directory as the uv form of the build profile.

  • Both uv run hook entries in catalog/snippets/pre-commit/.pre-commit-config.yaml now pass --no-project, matching the "Lint: Prose" and "Lint: EOL" tasks in catalog/snippets/configs/vscode-tasks-python.json. The helpers they run import only the standard library.
  • Checked with a constructed directory holding a pyproject.toml with only a [tool.ruff] table: the old entries wrote a uv.lock there, the new ones did not, and both helpers ran.
  • No other surface states these entries. A tree-wide search found only the two VS Code tasks, which already carry the flag.

A local strict review pass noted that --no-project also ignores the repository's requires-python when choosing an interpreter. That matches the VS Code tasks and the Husky snippet, which runs py -3 or python3 directly. The one consequence it traced, the prose gate silently skipping the AST checks on a file its interpreter cannot parse, is in code this change does not touch, so it is filed as #2163.

Closes on promotion: #2148

🤖 Generated with Claude Code

The pre-commit snippet ran its prose and EOL hooks as a project-scoped
`uv run`, which writes a `uv.lock` in a directory whose `pyproject.toml`
has none. Committed, that lock reclassifies a lint-only or pip-form
directory as the uv form of the build profile. Both entries now pass
`--no-project`, matching the "Lint: Prose" and "Lint: EOL" tasks in
`catalog/snippets/configs/vscode-tasks-python.json`, since the helpers
they run import only the standard library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:09
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 1fdd53a2-a7b4-4786-9aa5-5732cf55d7f4


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@a0806e3). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2164   +/-   ##
==========================================
  Coverage           ?   56.47%           
==========================================
  Files              ?       16           
  Lines              ?     7455           
  Branches           ?        0           
==========================================
  Hits               ?     4210           
  Misses             ?     3245           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 56.47% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The two-line change adds a well-understood flag that exactly matches the established sibling VS Code task pattern, and all PR description claims were verified against the tree.

Review effort: Balanced
Findings: None

What changed in this PR

This PR fixes a subtle side effect in the pre-commit framework catalog snippet. Its prose and EOL doc-gate hooks previously ran as a project-scoped uv run, which writes a uv.lock into any directory whose pyproject.toml lacks one. Once committed, that lock reclassifies a lint-only or pip-form directory as the uv form of the build profile (per the audit's python.profile.detect), so the hooks silently mutated repository classification. Adding --no-project prevents the lock from being written, and aligns the snippet with the sibling "Lint: Prose" and "Lint: EOL" VS Code tasks, which already carry the flag.

Changes:

  • Add --no-project to the prose-gate hook's uv run python hub-fetch-run.py ... prose_lint.py entry.
  • Add --no-project to the eol-gate hook's uv run python hub-fetch-run.py ... repo_gate.py entry.

I verified: these are the only two uv run doc-gate entries in the snippet; the referenced VS Code tasks (vscode-tasks-python.json:182,193) already use run --no-project python; and the Husky snippet runs the same doc gates directly via py -3/python3, so it is unaffected. The changes match the established pattern, and no documentation surface describes these entries in a way that now needs updating.

File Description
catalog/​snippets/​pre-commit/​.pre-commit-config.yaml Adds --no-project to both uv run doc-gate hook entries so they no longer write a uv.lock, matching the VS Code Lint tasks.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ptr727
ptr727 merged commit 617e200 into develop Sep 30, 2026
11 checks passed
@ptr727
ptr727 deleted the feature/auto-2148 branch September 30, 2026 13:12
ptr727 added a commit that referenced this pull request Sep 30, 2026
… a Second Site's Verify Token Pair, With Fifteen More (#2175)

## Summary

Promotes develop to main, carrying these pull requests:

- [#2172](#2172) Accept
Letters in Recorded Names in the Charset Rule and Prose Gate
- [#2173](#2173) Forward a
Second Site's Token Pair to the Deploy-Site Verify Hook
- [#2169](#2169) Record
HomeAutomation-Config's Merge-Bot and Gate Adoption in the Rollout
Tracking
- [#2164](#2164) Pass
--no-project to the Pre-Commit Snippet's uv run Hooks
- [#2161](#2161) Stop
Crediting an until read Loop as Bounded in the Guard
- [#2158](#2158) Drop the
Path Argument From the Pre-Commit Snippet's Mypy Swap
- [#2155](#2155) Reword
the Canonical CRLF-Exception Comments for a Carrier's Own Pin
- [#2153](#2153) End the
Guard's Stdin Redirect Scan at a Reserved Word
- [#2150](#2150) Describe
the Pip Form Consistently Across python-codestyle
- [#2144](#2144) Read the
Run Id From the Runner's Environment in the Artifact-Cleanup Steps
- [#2142](#2142) Diff a
Merge Commit's Prose Against Its Merged-In Parent in the Pre-Commit Hook
- [#2136](#2136) Qualify
the Local Review Skill's Merge-Base Command to Match the Engine
- [#2134](#2134) Quote the
Bare Placeholder in skills_install.py's Usage Block
- [#2132](#2132) Write the
Hub-Checkout Reach Into the session-handoff Chain Commands
- [#2130](#2130) Name the
Missing build-system Condition in the Lint-Only Profile Bullet
- [#2128](#2128) Skip a
Blockquoted List Marker in the Prose Gate's Semicolon Rule
- [#2119](#2119) State the
Three Gaps D4.7's Supersede-and-Dispatch Step Leaves Open

## Closes

Closes #2100
Closes #2031
Closes #1779
Closes #2148
Closes #1633
Closes #1188
Closes #1992
Closes #2032
Closes #2052
Closes #1481
Closes #2116
Closes #2107
Closes #2097
Closes #1512
Closes #2026
Closes #2101
Closes #2009

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Deployment verification can now check a second site using its own
optional authentication token.
* **Documentation**
* Updated writing guidance to preserve the spelling and diacritics of
recorded names.
* Clarified Python project setup, formatting and testing guidance, and
line-ending rules.
* Expanded deployment and publishing guidance, including scenarios where
publishing runs overlap.
* **Bug Fixes**
* Prose checks now handle quoted lists and tables more accurately, and
merge checks avoid flagging comments brought in from the merged branch.
  * Improved checks for shell loops that read redirected input.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants