-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: ci: check_compliance: Add python lint/format check
Add a compliance test using ruff, for both linting and formatting of newly added python files. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
- Loading branch information
Showing
5 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2024 Basalte bv | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
line-length = 100 | ||
target-version = "py310" | ||
|
||
[lint] | ||
select = [ | ||
# zephyr-keep-sorted-start | ||
"B", # flake8-bugbear | ||
"E", # pycodestyle | ||
"F", # pyflakes | ||
"I", # isort | ||
"SIM", # flake8-simplify | ||
"UP", # pyupgrade | ||
"W", # pycodestyle warnings | ||
# zephyr-keep-sorted-stop | ||
] | ||
|
||
ignore = [ | ||
# zephyr-keep-sorted-start | ||
"UP027", # deprecated pyupgrade rule | ||
# zephyr-keep-sorted-stop | ||
] | ||
|
||
[format] | ||
quote-style = "preserve" | ||
line-ending = "lf" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ pylint>=3 | |
unidiff | ||
yamllint | ||
sphinx-lint | ||
ruff |