-
Notifications
You must be signed in to change notification settings - Fork 16
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
ENH: Refactor code linter and formatter dependencies #144
ENH: Refactor code linter and formatter dependencies #144
Conversation
A few comments:
|
Also, we may want to add the eddymotion/.github/workflows/contrib.yml Line 23 in d23dcf0
so that it tells us how it would fix the code, instead of trying to discover it by ourselves. |
I don't think we would see how to fix the code unless we do a git diff right after, but I'm happy to do that. |
Oh, I see, this is not the github action, it's pre-commit. I personally would prefer to avoid pre-commit. But it is not a hill I intend to die on. |
Refactor code linter and formatter dependencies: - Remove `black`, `flake8` and `isort` dependencies from `pyproject.toml`: the role has been taken over by `ruff` in commit 81b3690. - Transfer the `black` and `isort` rules left behind to `ruff` in `pyproject.toml` - Remove `black`, `flake8` and `isort` from the pre-commit config file and use `ruff` instead. Set explicitly `eddymotion` as the known first party so that the `import` statements corresponding to `eddymotion` are separated by a blank line from third-party package `import` statements. Add `--diff` to the `ruff check` command in the contribution checks GitHub Actions workflow so that the differences that need to be applied are actually shown on GitHub.
Linter the `import` statements following the warning raised in https://github.com/nipreps/eddymotion/actions/runs/8458933073/job/23174220049#step:4:20
cea32f0
to
09d1146
Compare
Oh, yes, looks like meant more a diff-like thing than a fix for GHA, and the pre-commit config is probably only checking the modified files, and thus we are not seeing locally what the GHA is reporting. I fixed the issues in the last push-force. In a separate PR I will bring the |
Outstanding work - thanks! |
Refactor code linter and formatter dependencies:
black
,flake8
andisort
dependencies frompyproject.toml
: the role has been taken over byruff
in commit 81b3690.black
andisort
rules left behind toruff
inpyproject.toml
black
,flake8
andisort
from the pre-commit config file and useruff
instead.