chore(ruff): pin path-dep import classification - #3263
Merged
Conversation
hallerite
force-pushed
the
chore/fix-ruff
branch
from
August 13, 2026 13:31
ae25c87 to
bc92f09
Compare
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
force-pushed
the
chore/fix-ruff
branch
from
August 13, 2026 13:38
bc92f09 to
e7eed71
Compare
hallerite
marked this pull request as ready for review
August 13, 2026 13:39
mikasenghaas
approved these changes
Aug 13, 2026
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.
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 thedeps/path dependencies asknown-third-party, mirroring the existingknown-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 treatsverifiers,renderers, andpydantic_configas 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 existingknown-first-party = ["prime_rl"]workaround. No application code changes—onlypyproject.toml.Reviewed by Cursor Bugbot for commit e7eed71. Bugbot is set up for automated code reviews on this repo. Configure here.