Skip to content

boot-utils: Switch to ruff for Python formatting#129

Merged
nathanchance merged 1 commit intoClangBuiltLinux:mainfrom
nathanchance:ruff-format
Mar 25, 2026
Merged

boot-utils: Switch to ruff for Python formatting#129
nathanchance merged 1 commit intoClangBuiltLinux:mainfrom
nathanchance:ruff-format

Conversation

@nathanchance
Copy link
Copy Markdown
Member

We started using ruff for linting a while ago. Since then, it has grown a formatting option, which is quite fast. While it is a little less flexible than yapf, we don't currently customize the behavior aside from some exemptions.

Switch to ruff for formatting. Most of the changes end up making the code a little more readable, at the expense of some extra lines. Switch to the generic fmt comments instead of the yapf specific ones. Use the option to preserve our quoting style, which uses single quotes for string literals and double quotes for f-string or raw strings.

NOTE: The linting job will not succeed until ClangBuiltLinux/actions-workflows#11 is merged.

We started using ruff for linting a while ago. Since then, it has grown
a formatting option, which is quite fast. While it is a little less
flexible than YAPF, we don't currently customize the behavior aside from
some exemptions.

Switch to ruff for formatting. Most of the changes end up making the
code a little more readable, at the expense of some extra lines. Switch
to the generic fmt comments instead of the yapf specific ones. Use the
option to preserve our quoting style, which uses single quotes for
string literals and double quotes for f-string or raw strings.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@nathanchance nathanchance merged commit 5d7a2be into ClangBuiltLinux:main Mar 25, 2026
7 of 14 checks passed
@nathanchance nathanchance deleted the ruff-format branch March 25, 2026 03:55
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