Closed jhlegarreta closed 2 months ago
@skoudoro Slight differences between isort
and ruff
. I've checked that the changes are also consistent with what ruff
did for DIPY, e.g.:
https://github.com/dipy/dipy/pull/3184/files#diff-0b50e0854fbf05412be4bc9cbd9852d4627500eb598d0fc05850998fe93e73e6R6
Would have expected all from y import z
come after all import x
, but looks like it is not the case always.
Anyways, green light to fix the issues and continue making steps towards adopting ruff
?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.47%. Comparing base (
a4d6792
) to head (4b79dbc
).:exclamation: Current head 4b79dbc differs from pull request most recent head b6f7bac. Consider uploading reports for the commit b6f7bac to get more accurate results
Hi @jhlegarreta,
All good.
However, the code format is failing. do you want to fix it here or in a new PR ?
However, the code format is failing. do you want to fix it here or in a new PR ?
Doing it here.
Prefer using
ruff
instead ofisort
to enforce import statement sorting.ruff
's import sorting rules are near-equivalent to isort's when usingisort
'sprofile="black"
: https://docs.astral.sh/ruff/faq/#how-does-ruffs-import-sorting-compare-to-isortChange the
tool.isort
section inpyproject
so that the correspoding tasks fall under the responsibility offlake8
.Adapt accordingly the pre-commit hook config file to apply the import sorting to local files prior to commits.
Add a GHA workflow to apply the pre-commit hooks in order to ensure that files modified across commits/in PRs comply with the expected formatting.