Skip to content
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

Use ruff for linting and formatting #105

Merged
merged 14 commits into from
Nov 28, 2024
Merged

Use ruff for linting and formatting #105

merged 14 commits into from
Nov 28, 2024

Conversation

pbarbarant
Copy link
Collaborator

@pbarbarant pbarbarant commented Nov 25, 2024

Fixes #104. Adds ruff to replace flake8, isort and black.

Follows the same config as nilearn for consistency.

@pbarbarant pbarbarant marked this pull request as ready for review November 25, 2024 16:16
Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM so far. Do you want to add more changes ?

tuning_pred_run_1,
tuning_pred_run_2,
n_components=2,
dissimilarity=1 - corr_tunning,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will ruff complain if this is formatted as

Suggested change
dissimilarity=1 - corr_tunning,
dissimilarity=(1 - corr_tunning),

? I find it more human-readable, but not worth breaking automation !

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both ruff format and ruff check don't seem to complain so I'm adding it.

Copy link
Collaborator

@emdupre emdupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, thank you @pbarbarant !

@pbarbarant
Copy link
Collaborator Author

This LGTM, thank you @pbarbarant !

I'm merging it as soon as CI finishes.

@pbarbarant
Copy link
Collaborator Author

There are still a lot of issues regarding docstrings and documentation though, I suggest adding D-related rules in a future PR.

@pbarbarant pbarbarant merged commit 024884a into main Nov 28, 2024
6 checks passed
@pbarbarant pbarbarant deleted the maint/add-ruff branch November 28, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MAINT] Use ruff for linting and formatting
3 participants