-
Notifications
You must be signed in to change notification settings - Fork 190
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
Swap from flake8 to ruff #963
Swap from flake8 to ruff #963
Conversation
961e4d3
to
cab785b
Compare
Awesome, @glowatsk! It looks like in the CI the error: Failed to parse `/home/runner/work/openverse/openverse/.ruff.toml`: TOML parse error at line 7, column 15
|
7 | line-length = 88
| ^^
invalid type: integer `88`, expected a sequence details of the CI run here: https://github.com/WordPress/openverse/actions/runs/4471769545/jobs/7857074527?pr=963 |
cab785b
to
04b027e
Compare
Thanks, looks like this is default and is no longer needed. |
Remove E203 W503 as these are handled by Black Line length is by default 88
04b027e
to
fac9b4e
Compare
Add noqa for long link in comment
@zackkrida think this is good to go now. |
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.
Fantastic, thanks for the contribution @glowatsk.
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.
Sweet, nice work @glowatsk
CI has to pass before we merge this. Because if not, every other PR will fail CI. Update: my mistake. I wrongly interpreted the lint check to be failing. |
Should just need the appropriate stack label. |
Ah, sorry, my bad. I misread the lint check as failing. The 'CI + CD / Add stack label (pull_request)' check fails on PRs from forks, so we can merge it despite the failing check. |
Thanks so much for this contribution @glowatsk!! What an awesome improvement to have come from the PyCascades sprints 😄 🥳 🏎️ |
Oh also, does #787 still need to remain open, or can it be closed? |
We had a community contributor take this on in WordPress/openverse#963 and we were so pleased with the results! Heard about this on Talk Python To Me and we're glad we did 😄 Thanks for the excellent tool!
* Fill creator name in finnish museum DAG (#978) * Bump pre-commit from 2.21.0 to 3.0.2 (#983) * 🔄 synced local '.pre-commit-config.yaml' with remote 'templates/.pre-commit-config.yaml.jinja' * Update docstrings to conform to linting * Update DAGs.md --------- Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: openverse-bot <null> Co-authored-by: Madison Swain-Bowden <bowdenm@spu.edu>
Fixes
Partially addresses #787
Description
Move the current configuration to the ruff linter. pre-commit will use ruff now for linting, extra configuration can be added as needed. I opted for
.ruff.yaml
as the dotfile is usually handled better with editors. This can be changed as needed.E203 is made obsolete by black.
W503 is made obsolete by black.
Line length is by default 88.
https://beta.ruff.rs/docs/rules/
I do not see any documentation involving flake8.
Testing Instructions
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin