boot-utils: Enable EM rule set and preview mode for ruff#133
Merged
msfjarvis merged 8 commits intoClangBuiltLinux:mainfrom Apr 16, 2026
Merged
Conversation
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
To catch any changes to ruff's default rule set. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
While this is a little more verbose, it should result in easier to read exceptions since the exception message won't be printed twice in the stacktrace. This also allows us to drop disabling TRY003. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
error[PLR6201]: Use a set literal when testing for membership
--> utils.py:129:19
|
127 | # If the image is an uncompressed vmlinux or a UML image, it is in the
128 | # root of the build folder
129 | elif image in ("vmlinux", "linux"):
| ^^^^^^^^^^^^^^^^^^^^
130 | kernel = kernel_location.joinpath(image)
131 | # Otherwise, it is in the architecture's boot directory
|
help: Convert to `set`
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
error[PLR6301]: Method `_have_dev_kvm_access` could be a function, class method, or static method
--> boot-qemu.py:174:9
|
172 | return tuple(int(x) for x in match.groups()[0].split('.'))
173 |
174 | def _have_dev_kvm_access(self) -> bool:
| ^^^^^^^^^^^^^^^^^^^^
175 | return os.access('/dev/kvm', os.R_OK | os.W_OK)
|
help: Consider adding `@typing.override` if this method overrides a method from a superclass
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
To gain access to some experimental warnings that are still useful. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Member
|
pylint seems to disagree with flake8-errmsg |
************* Module boot-qemu boot-qemu.py:85:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:104:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:133:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:160:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:170:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:182:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:264:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:280:12: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) boot-qemu.py:737:8: W0621: Redefining name 'msg' from outer scope (line 865) (redefined-outer-name) ************* Module rebuild buildroot/rebuild.py:67:12: W0621: Redefining name 'msg' from outer scope (line 175) (redefined-outer-name) buildroot/rebuild.py:116:16: W0621: Redefining name 'msg' from outer scope (line 175) (redefined-outer-name) buildroot/rebuild.py:122:8: W0621: Redefining name 'msg' from outer scope (line 175) (redefined-outer-name) buildroot/rebuild.py:175:8: C0103: Constant name "msg" doesn't conform to UPPER_CASE naming style (invalid-name) Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Member
Author
Thanks. I pushed a quick fix. I think we can probably drop |
msfjarvis
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the individual changes for the full details.