-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add "src"
to src
default
#12454
Comments
charliermarsh
added
breaking
Breaking API change
isort
Related to import sorting
labels
Jul 22, 2024
@charliermarsh I suspect that you can make the change 10x faster than me. Would you have the time to PR the change. If not, then that's fine and I'll give it a try. |
Yeah no worries. |
I'll do it today. |
charliermarsh
added a commit
that referenced
this issue
Aug 14, 2024
## Summary Occasionally, we receive bug reports that imports in `src` directories aren't correctly detected. The root of the problem is that we default to `src = ["."]`, so users have to set `src = ["src"]` explicitly. This PR extends the default to cover _both_ of them: `src = [".", "src"]`. Closes #12454. ## Test Plan I replicated the structure described in #12453, and verified that the imports were considered sorted, but that adding `src = ["."]` showed an error.
AlexWaygood
pushed a commit
that referenced
this issue
Aug 14, 2024
## Summary Occasionally, we receive bug reports that imports in `src` directories aren't correctly detected. The root of the problem is that we default to `src = ["."]`, so users have to set `src = ["src"]` explicitly. This PR extends the default to cover _both_ of them: `src = [".", "src"]`. Closes #12454. ## Test Plan I replicated the structure described in #12453, and verified that the imports were considered sorted, but that adding `src = ["."]` showed an error.
MichaReiser
pushed a commit
that referenced
this issue
Aug 14, 2024
## Summary Occasionally, we receive bug reports that imports in `src` directories aren't correctly detected. The root of the problem is that we default to `src = ["."]`, so users have to set `src = ["src"]` explicitly. This PR extends the default to cover _both_ of them: `src = [".", "src"]`. Closes #12454. ## Test Plan I replicated the structure described in #12453, and verified that the imports were considered sorted, but that adding `src = ["."]` showed an error.
MichaReiser
pushed a commit
that referenced
this issue
Aug 14, 2024
## Summary Occasionally, we receive bug reports that imports in `src` directories aren't correctly detected. The root of the problem is that we default to `src = ["."]`, so users have to set `src = ["src"]` explicitly. This PR extends the default to cover _both_ of them: `src = [".", "src"]`. Closes #12454. ## Test Plan I replicated the structure described in #12453, and verified that the imports were considered sorted, but that adding `src = ["."]` showed an error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We've received a few issues about this, and it's a common source of confusion. Rye actually defaults to this layout, so it's odd that we don't respect it in Ruff.
See, e.g., #12453.
The text was updated successfully, but these errors were encountered: