-
Notifications
You must be signed in to change notification settings - Fork 26
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
Use ruff
instead of isort
and black
and enforce basic linting
#152
Merged
Olen
merged 5 commits into
Olen:main
from
elliot-100:115-ci-isort-github-action-doesnt-report-expected-issues
Feb 13, 2025
Merged
Use ruff
instead of isort
and black
and enforce basic linting
#152
Olen
merged 5 commits into
Olen:main
from
elliot-100:115-ci-isort-github-action-doesnt-report-expected-issues
Feb 13, 2025
+45
−29
Conversation
This file contains 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
2ea13d2
to
ac3bafa
Compare
ac3bafa
to
19f6697
Compare
df4a246
to
64995bb
Compare
0655499
to
0458dc6
Compare
This enforces import sorting in example files, which isort didn't do. Notes: - Ruff takes a single value for `target-version` - the minimum Python version that should be supported - Use `ruff check --fix` instead of `isort .` at CLI - Use `ruff format` instead of `black .` at CLI
0458dc6
to
1fa9053
Compare
Back to draft as I am still getting inconsistent behaviour between local and CI... |
`config` module may be present in local dev, but won't be in CI - this causes inconsistent behaviour
OK, that now gives consistent behaviour whether |
ruff
instead of isort
and black
ruff
instead of isort
and black
and enforce basic linting
@Olen are you OK with this please? |
LGTM |
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.
This PR effectively replaces
isort
+black
withruff check
/ruff format
, including in CI.ruff
's formatting rules - these differ slightly fromblack
's, but I don't think it's worth worrying about that.How to use at CLI when developing:
ruff check --fix
to autolint, instead ofisort .
to just sort importsruff format
instead ofblack .