chore(deps): add ruff to dev dependency group#331
Open
iksnerd wants to merge 1 commit into
Open
Conversation
`CONTRIBUTING.md` instructs contributors to run `uv run ruff format .` and `uv run ruff check --fix .` before every commit, but `ruff` is not listed under `[dependency-groups].dev` in `pyproject.toml`. As a result, `uv sync --dev` does not install it and `uv run ruff` fails with `Failed to spawn: ruff`. Contributors currently have to fall back to `uvx ruff` to get any formatting/linting done. Add `ruff>=0.6` to the `dev` group so the documented workflow works on a fresh `uv sync`. No version pin tighter than `>=0.6` to allow uv's resolver to pick whatever's compatible with the rest of the dev tree. Signed-off-by: iksnerd <bdrensk@me.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CONTRIBUTING.md(lines 73-79) tells contributors to run:```bash
uv run ruff format .
uv run ruff check --fix .
```
before every commit. However,
ruffis not listed under[dependency-groups].devinpyproject.toml, souv sync --devdoes not install it. The commands above fail on a fresh checkout with:```
error: Failed to spawn: `ruff`
Caused by: No such file or directory (os error 2)
```
The current workaround is
uvx ruff …, which installs ruff into a transient location on every invocation. This PR addsruffto thedevgroup so the documented workflow works as written.Changes
Files changed:
```
pyproject.toml | 1 +
uv.lock | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+)
```
pyproject.toml— adds\"ruff>=0.6\"to thedevgroup. Lower bound is intentionally loose (>=0.6) so uv's resolver can pick whatever is compatible with the rest of the dev tree; tighter pinning would only be worth it if a particular ruff version became required.uv.lock— regenerated byuv sync --group dev. Resolves ruff 0.15.14 at the time of this PR.Verification
```bash
uv sync --group dev # → Installed ruff==0.15.14
uv run ruff --version # → ruff 0.15.14
uv run ruff check src/servers/utilities/main.py # → All checks passed!
```
The documented workflow now works on a fresh
uv sync.Checklist