Replace flake8 and move isort on Python files to ruff #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number of the reported bug or feature request: #45
Describe your changes
ruff
that cover flake8 checks and isort for Python filesTesting performed
Additional context
Some
isort
options are not supported byruff
.Option
multi_line_output = 3
(break multiple imports in multiple lines using parenthesis) is not supported by ruff. The default behavior is the same asmulti_line_output = 7
(all imports in one line without breaks), which used alongforce-single-line = true
causes the multiple import to be split into individual imports. For example:is reformatted to:
Options
include_trailing_comma = true
andforce_grid_wrap = 0
are related tomulti_line_output = 3
and are not applicable in ruff.Option
use_parentheses = true
is also not supported by ruff, but because imports are in individual lines andline-length = 95
, removing it would be very unlikely to cause problems.Some references:
Use Parentheses in isort documnentation
Multi Line Output Modes in isort documentation
Flake 8 rules
Ruff rules