-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
switch to ruff #5218
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
switch to ruff #5218
Conversation
@gvwilson big picture comments --
-
I have a STRONG preference for also committing the
ruff
-formatted files as part of this PR. (To avoid cluttering up this PR, the formatting changes themselves could be done on a separate branch which branches off of this one.) But if we don't do the actual formatting step as part of this PR, we'll miss issues and then have to fix them later once this is onmain
. -
The
CONTRIBUTING.md
needs to be updated to remove references torequires-optional.txt
, and it needs some general updates as well. I'd be happy to work on that. -
Could we add the
uv.lock
in a separate PR? I'm not opposed, butCONTRIBUTING.md
needs to be updated to explain how to use the lockfile in development, otherwise things will get messy.
af41d30
to
9c60129
Compare
What would you think of adding an item to the pull request template documentations section that recommends:
[ ] start Python code blocks with ```python?
It's something that is not obvious in the checklist and that I've forgotten to do a couple times. Forgetting to do so can prevent the example from displaying.
9c60129
to
430154e
Compare
- Run `ruff format --check .` instead of `ruff format .` in Circle CI. - Use `base_type is list` instead of `base_type == list`. - Remove commented-out lines of code. - Remove unnecessary parentheses around some strings. - Be more consistent about (re-)naming test functions that had duplicated names. - Use `noqa: F401` to suppress `ruff check` complaint about unused import.
e8c2317
to
4a1a814
Compare
3c5fd13
to
4ba788c
Compare
4ba788c
to
0db8555
Compare
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.
Woohoo! 🚀
Uh oh!
There was an error while loading. Please reload this page.
requires-optional.txt
andtest_requirements/*
(no longer used).commands.py
to useargparse
instead of hand-rolled.codegen/__init__.py
(all at top level)."dev"
section ofpyproject.toml
to useruff
instead ofblack
.pyproject.toml
to installinflect
andrequests
.uv.lock
file.codegen/__init__.py
to useruff
instead ofblack
.ruff
to reformat existing code (runpython commands.py format
).ruff
to check code (runpython commands.py lint
).This PR has been rebuilt on top of #5214 to include recent changes to validator generation.
This PR currently fails the build because Circle CI is expecting
requires-optional.txt
, which this PR removes.We need to decide if we're leaving build on Circle CI or moving it to GitHub.