-
Notifications
You must be signed in to change notification settings - Fork 528
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
Replace black, flake8, pyupgrade with ruff for Python linting and formatting #3248
Conversation
Thoughts on adding |
Looking at AMO, they completely dropped black for ruff, and use some configuration options I guess it should be replacing both flake8 and black at this point 🤔 |
Seems like All that while being faster. Sounds like a win-win to me. |
Oh, I missed pyupgrade. Let me play with it a bit more, especially with the configuration part, and see how far I can go. |
There are quite a few changes running
Not completely sure what we want to add/enable in the TOML file. EDIT: I suppose that we could exclude |
Disable that? https://docs.astral.sh/ruff/rules/one-blank-line-after-class/ |
I don't see a way to disable it in the format part (while it would be possible in the linting), very much like black wasn't configurable. |
See also astral-sh/ruff#9745 |
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.
I don't see a way to disable it in the format part (while it would be possible in the linting), very much like black wasn't configurable.
Oh, I see...
We talked about this PR at the call today and we all agreed we should go ahead.
Also, nobody expressed strong opinions the new line after block open and/or about excluding migration files, so let's leave that as it is for now. Eemeli suggested we also look into https://pycqa.github.io/isort/. |
In case, looks like it can be fine-tuned for Django (see AMO file) |
No description provided.