Skip to content
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

Closed
charliermarsh opened this issue Jul 22, 2024 · 3 comments · Fixed by #12848
Closed

Add "src" to src default #12454

charliermarsh opened this issue Jul 22, 2024 · 3 comments · Fixed by #12848
Assignees
Labels
breaking Breaking API change isort Related to import sorting
Milestone

Comments

@charliermarsh
Copy link
Member

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.

@MichaReiser
Copy link
Member

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

@charliermarsh
Copy link
Member Author

Yeah no worries.

@charliermarsh
Copy link
Member Author

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
Labels
breaking Breaking API change isort Related to import sorting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants