-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Apply new repo-review suggestion RF003 #12937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b44f3b4
to
8bf09c1
Compare
I tried this myself after seeing the ruff changelog but it produces wrong import sorting, known-third-party = ["pip._vendor"] But this PR moves |
Indeed, this doesn't seem right. Pehraps related to astral-sh/ruff#10266. |
OP in that issue says It might be the same as this astral-sh/ruff#12984. |
8bf09c1
to
5c55f53
Compare
RF003: src directory doesn't need to be specified anymore (0.6+) Ruff now (0.6+) looks in the src directory by default. The src setting doesn't need to be specified if it's just set to `["src"]`.
5c55f53
to
65cf185
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruff still doesn't seem to correctly recognize namespace imports based in the src directory. I don't know exactly which bugs in ruff contribute to this, but without specifying src = ["src"]
or manually setting the isort.sections
it still doesn't work.
import pytest | ||
from pip._internal.utils.misc import hash_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3rd Party Libraries should be in a different group to pip._internal
from pip._internal.utils import compatibility_tags | ||
|
||
from pip._vendor.packaging.version import Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vendored packages should be before first-party.
RF003: src directory doesn't need to be specified anymore (0.6+)
Ruff now (0.6+) looks in the src directory by default. The src setting doesn't need to be specified if it's just set to
["src"]
.CAVEAT: Removing
src = ["src"]
results in changes related to theI
rules, as suggested by the 0.6.0 release announcement;