Closed litan1106 closed 7 months ago
This PR breaks the type check.
Locally, please run
tox -e type
,tox -e flake8
, andtox -e py311
All passed now. I just turned off the ruff auto format on these two lines.
Thanks for the PR @litan1106. I had been thinking about adding a auto fixer for a while too. One question - what's the reason for having both flake and ruff?
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 :)
@litan1106 I force pushed to your PR - I split everything up into two commits.
1: Adding ruff configurations
2: Autoformatting everything using tox -e ruff
3: Adds a ruff check to CI
We can consider adding ruff as the linter in the future by the way. For now let us keep flake8 :)
Attention: 137 lines
in your changes are missing coverage. Please review.
Comparison is base (
593eb07
) 86.21% compared to head (32aa1fe
) 86.21%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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: