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-format for consistent code formatting #240

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LecrisUT
Copy link
Contributor

Depends-on #202 for the PEP621 of course

Copied all of the configuration from tmt and I have disabled a bunch of tests just so that we can bring this in first and then do each one in a separate PR

@LecrisUT LecrisUT force-pushed the ci/ruff branch 2 times, most recently from 80c0507 to 01aa1ae Compare June 17, 2024 18:40
@psss psss added this to the 1.6 milestone Dec 2, 2024
@psss
Copy link
Collaborator

psss commented Jan 6, 2025

This should now be unblocked as #202 has been already merged. @LecrisUT, could you please rebase on the latest main? Thanks.

@psss psss modified the milestones: 1.6, 1.7 Jan 7, 2025
@LecrisUT LecrisUT marked this pull request as ready for review January 8, 2025 09:18
@LecrisUT
Copy link
Contributor Author

LecrisUT commented Jan 8, 2025

Ok, all rebased, but I did not check the equivalence with tmt yet and there seem to be a few other rules that need to be commented out for the initial PR.

@psss psss changed the title Add ruff Use ruff-format for consistent code formatting Mar 4, 2025
@psss
Copy link
Collaborator

psss commented Mar 4, 2025

@LecrisUT, what about syncing now the list of ignore rules with the tmt config to have it consistent?

@psss
Copy link
Collaborator

psss commented Mar 7, 2025

Ruff config synced with the tmt repo settings in 570a96d.

@psss psss modified the milestones: 1.7, 1.8 Mar 7, 2025
@psss
Copy link
Collaborator

psss commented Mar 7, 2025

One more milestone bump (hopefully last), as we want to release today and so many code changes would not be a good idea right before the release.

@psss psss added the style label Mar 7, 2025
@psss
Copy link
Collaborator

psss commented Mar 7, 2025

The docstring adjustments in #285 should be merged before this one.

LecrisUT and others added 2 commits March 10, 2025 12:17
Signed-off-by: Cristian Le <[email protected]>
Let's make the setup of both projects consistent.
rev: "7.1.1"
hooks:
- id: flake8
- id: ruff
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- id: ruff
- id: ruff-format

Probably only want to deal with formatting as part of this PR?

Comment on lines +21 to +23
- '--fix'
- '--show-fixes'
- id: ruff-format
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- '--fix'
- '--show-fixes'
- id: ruff-format
- '--diff'

[tool.ruff]
line-length = 99
src = ["fmf", "tests"]
target-version = "py39"
Copy link
Contributor

Choose a reason for hiding this comment

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

99% sure ruff gets this from package metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants