Add a python lint and format check#135
Merged
jk-ozlabs merged 10 commits intoCodeConstruct:mainfrom Jan 27, 2026
Merged
Conversation
F821 Undefined name `a`
--> tests/mctpenv/__init__.py:348:52
|
346 | await self.handle_mctp_control(sock, addr, data)
347 | else:
348 | print(f"unknown MCTP message type {a.type}")
| ^
349 | else:
350 | for br_ep in self.bridged_eps:
|
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Fix ruff lint F401. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Fix ruff lint E703. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Fix ruff lint F841. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Fix ruff lint E711. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Docstrings should be within the block they document. Move and reformat with no leading space, and multi-line strings should have their closing-triple-quote on its own line. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Now that we have lints passing, add a basic ruff.toml configuration, and reformat accordingly. We leave the quote-style as-is, but may unify this later. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
0ea4900 to
f41eca7
Compare
Member
Author
|
Rebased to current main. |
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.
We're using the meson clang-format infrastructure to check C code, but have no equivalent for the python under
tests/This PR uses ruff to lint (and contains fixes for existing warnings) and format, and adds to the default PR action.