-
Notifications
You must be signed in to change notification settings - Fork 249
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
[lint] replaces black formatting with ruff #14132
[lint] replaces black formatting with ruff #14132
Conversation
oh wait, okay, i'm gonna see if there's an equivalent to |
97b15b3
to
44d9c7e
Compare
okay, enabled the |
Interesting, PEP 8 does have an opinion about triple-quoted strings. FWIW, I'm happy to go stricter in the future and allow string normalization and all that (assuming other folks are on board), but I appreciate you aligning the configs for this PR! |
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.
This looks great! One last request and I'll approve: could you remove black
from the dev requirements and replace the pre-commit hook?
f' dataset {name}.\n' | ||
f'Available platforms: {clouds}.') | ||
raise ValueError( | ||
f'Cloud platform {repr(cloud)} not available for' f' dataset {name}.\n' f'Available platforms: {clouds}.' |
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.
This line is a little unfortunate. Let's combine them into one f-string.
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.
done!
fixed up the dev requirements, and updated the pre-commit hook, and in the process realized i had only run EDIT: i misunderstood how the pre-commit hooks work, and apparently it only runs them on the files you have changed, but i think it's still worth it to format across the repo, not just in the places we check with also i personally would love if our quotes were consistent as well! i'll ask on zulip how ppl feel about that |
ruff
is faster thanblack
when formatting Pythonfiles
, so this change replaces the formatting checks for our files with calls toruff
instead ofblack
, and runsruff format
on all files that would cause those checks to fail.