-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add ruff auto fix #657
Add ruff auto fix #657
Conversation
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 PR breaks the type check.
Locally, please run tox -e type
, tox -e flake8
, and tox -e py311
Thanks for the PR @litan1106. I had been thinking about adding a auto fixer for a while too. |
I think @berndverst wanted to keep flake8 for linting. Ruff can do both linting and auto format. I think it's okay to keep using flake8 since we don't want to change too many things in one PR. |
I understand. Do they have different behaviour though? If we can configure ruff to use the same lint rules as flake8, keeping it simple with a single tool that does both things would be nice. One problem would be if we plan on using some of the flake plugins in the future... What do you think @berndverst? Also, I think it would be best if we kept the PR to the configuration changes only. We can apply the new formatting in a separate PR later. |
@elena-kolevska flake8 is a much much more common linter for Python. That's why I don't want to switch to ruff for linting :) |
Signed-off-by: Bernd Verst <[email protected]>
Signed-off-by: Bernd Verst <[email protected]>
d07a092
to
8f51088
Compare
@litan1106 I force pushed to your PR - I split everything up into two commits. |
We can consider adding ruff as the linter in the future by the way. For now let us keep flake8 :) |
Signed-off-by: Bernd Verst <[email protected]>
6b361b4
to
4706099
Compare
Signed-off-by: Bernd Verst <[email protected]>
72660e6
to
32aa1fe
Compare
Description
How to use it?
tox -e ruff
to auto-format codeIssue reference
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: