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

Show diff when running ruff format #258

Merged
merged 2 commits into from
Feb 9, 2025
Merged

Show diff when running ruff format #258

merged 2 commits into from
Feb 9, 2025

Conversation

pgiraud
Copy link
Member

@pgiraud pgiraud commented Jan 29, 2025

No description provided.

@pgiraud pgiraud mentioned this pull request Feb 7, 2025
@pgiraud pgiraud changed the title Ruff improvements Show diff when running ruff format Feb 7, 2025
@pgiraud
Copy link
Member Author

pgiraud commented Feb 7, 2025

Please review.

@rjuju
Copy link
Member

rjuju commented Feb 8, 2025

I don't see those options in the documentation at https://docs.astral.sh/ruff/formatter/, do you know where they are documented?

What I do see on that page is

A unified command for both linting and formatting is planned.

We should probably wait for that to be merged or specify an explicit version of ruff to avoid breaking all the CI because ruff decided to change again how to format code. And since it seemed to have happened recently, I would be in favor of fixing the ruff version for as long as we can.

@pgiraud
Copy link
Member Author

pgiraud commented Feb 8, 2025

The --diffoption has been added to ruff format command a while ago. https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md#011

Indeed, the documentation is missing. It's is available via --help though.

@rjuju
Copy link
Member

rjuju commented Feb 8, 2025

ok, I would still prefer to hardcode whatever is the current version in the requirements file and make sure everyone and the CI stays on the same version to avoid the same problem as we had last week.

@rjuju
Copy link
Member

rjuju commented Feb 8, 2025

(sorry typo, I meant version not option, updated the previous comment)

@rjuju rjuju self-requested a review February 9, 2025 00:10
@rjuju rjuju merged commit 259389d into master Feb 9, 2025
2 checks passed
@rjuju rjuju deleted the ruff_improvements branch February 9, 2025 00:11
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.

2 participants