Skip to content

chore(deps): add ruff to dev dependency group#331

Open
iksnerd wants to merge 1 commit into
IBM:mainfrom
iksnerd:chore/ruff-dev-deps
Open

chore(deps): add ruff to dev dependency group#331
iksnerd wants to merge 1 commit into
IBM:mainfrom
iksnerd:chore/ruff-dev-deps

Conversation

@iksnerd
Copy link
Copy Markdown

@iksnerd iksnerd commented May 25, 2026

Description

CONTRIBUTING.md (lines 73-79) tells contributors to run:

```bash
uv run ruff format .
uv run ruff check --fix .
```

before every commit. However, ruff is not listed under [dependency-groups].dev in pyproject.toml, so uv sync --dev does 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 adds ruff to the dev group so the documented workflow works as written.

Changes

  • Dependency update (`uv lock`)
  • Documentation / Tutorial update
  • Refactoring (no logic change)

Files changed:

```
pyproject.toml | 1 +
uv.lock | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+)
```

pyproject.toml — adds \"ruff>=0.6\" to the dev group. 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 by uv 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

  • I have signed off my commits (DCO).

`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>
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.

1 participant