Open SAMAD101 opened 6 months ago
I tried checking E201 and E241 of flake8 but ruff couldn't catch them and were fixed by black.
I tried checking E201 and E241 of flake8 but ruff couldn't catch them and were fixed by black.
Both rules are marked as preview, so I assume they will only be enabled in the next ruff release: https://docs.astral.sh/ruff/rules/#error-e
I tried checking E201 and E241 of flake8 but ruff couldn't catch them and were fixed by black.
Both rules are marked as preview, so I assume they will only be enabled in the next ruff release: https://docs.astral.sh/ruff/rules/#error-e
That makes sense. But I tried some stable ones (E501 and E703), failed to catch them also. @SAMAD101 can you check if this is working for you?
Also since more than half of the pycodestyle rules are still in preview, should we enable ruff's preview mode or wait for them to get stable before trying to replace flake8?
I tried checking E201 and E241 of flake8 but ruff couldn't catch them and were fixed by black.
Might be because it had to configured in ruff.toml
Works fine now. Checked
I tried checking E201 and E241 of flake8 but ruff couldn't catch them and were fixed by black.
Both rules are marked as preview, so I assume they will only be enabled in the next ruff release: https://docs.astral.sh/ruff/rules/#error-e
That makes sense. But I tried some stable ones (E501 and E703), failed to catch them also. @SAMAD101 can you check if this is working for you?
Those seem to be working fine as well.
You can check them using: ruff check src/ --preview --select <rule_code>
You should reset your fork's master brach to upstream since it is diverged for a long time already.
will do
Just to be clear slow linting isn't a problem we have. So this change should also simplify the config in some way or make it easier to run.
Just to be clear slow linting isn't a problem we have. So this change should also simplify the config in some way or make it easier to run.
yeah, it does somewhat simplify the cofigs. And linting is just as easy to run as it was, we can use pre-commit or 'ruff check'
Description
This PR removes flake8 from
.pre-commit-config.yaml
,setup.cfg
and adds ruff for lintingRelated Issue
Resolves #1969
Motivation and Context
ruff is faster so yeah...
How Has This Been Tested?
Manually tested,
pre-commit
,make lint
works fine.Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.