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

Apply new repo-review suggestion #9650

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Aug 24, 2024

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"].

https://learn.scientific-python.org/development/guides/repo-review/?repo=python-poetry%2Fpoetry&branch=main

CAVEAT: Removing src = ["src"] results in changes related to the I rules, as suggested by the 0.6.0 release announcement;

By default, our isort rules now search inside src/ directories when determining the list of package names that are likely to represent first-party code. This was always configurable, but it was suprising for many users that Ruff didn't understand this common project structure "out of the box".

This change may result in some of your imports being reordered or recategorised, as import statements that these rules previously considered to be third-party imports will now be correctly understood as first-party.

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as draft August 24, 2024 14:11
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review August 24, 2024 19:16
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"]`.
@Secrus Secrus merged commit 3183126 into python-poetry:main Sep 4, 2024
75 checks passed
Copy link

github-actions bot commented Oct 6, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants