Skip to content

chore(ruff): pin path-dep import classification - #3263

Merged
hallerite merged 1 commit into
mainfrom
chore/fix-ruff
Aug 13, 2026
Merged

chore(ruff): pin path-dep import classification#3263
hallerite merged 1 commit into
mainfrom
chore/fix-ruff

Conversation

@hallerite

@hallerite hallerite commented Aug 13, 2026

Copy link
Copy Markdown
Member

ruff's isort classifies a module as first-party if it resolves under a source root of the working tree — so classification depends on what happens to exist in a checkout, and local hooks vs CI can disagree (a stray untracked verifiers/ dir at the repo root did exactly that: pre-commit kept re-sorting imports into a layout CI rejects). Pin the deps/ path dependencies as known-third-party, mirroring the existing known-first-party = ["prime_rl"], so import grouping is a property of the repo.

One line in pyproject.toml, no code changes. Verified with ruff 0.13.0 (CI's pin) and 0.15.x (lockfile), with and without the stray dir present.

🤖 Generated with Claude Code


Note

Low Risk
Tooling-only Ruff/isort configuration with no runtime or application logic changes.

Overview
Pins isort classification for editable deps/ packages so Ruff no longer treats verifiers, renderers, and pydantic_config as first-party when a matching directory happens to exist in a developer checkout.

Adds known-third-party = ["verifiers", "renderers", "pydantic_config"] under [tool.ruff.lint.isort], alongside the existing known-first-party = ["prime_rl"] workaround. No application code changes—only pyproject.toml.

Reviewed by Cursor Bugbot for commit e7eed71. Bugbot is set up for automated code reviews on this repo. Configure here.

@hallerite hallerite changed the title chore: fix ruff import sorting repo-wide chore(ruff): pin path-dep import classification Aug 13, 2026
ruff infers first-party modules from directories at the source root, so a
stray untracked verifiers/ dir in a working tree flips `import verifiers` to
first-party there — local pre-commit hooks then re-sort imports into a layout
CI (which checks out clean) rejects. Declare the deps/ path dependencies
known-third-party so classification is a property of the repo, not of what
happens to exist in someone's checkout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hallerite
hallerite marked this pull request as ready for review August 13, 2026 13:39
@hallerite
hallerite requested a review from samsja August 13, 2026 16:22
@hallerite
hallerite merged commit b1d4f2f into main Aug 13, 2026
21 checks passed
@hallerite
hallerite deleted the chore/fix-ruff branch August 13, 2026 17:14
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