summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-04-11 12:37:29 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-11 21:51:56 +0000
commitb27e04aff8b4a30ff96749b6db722d6dffc3ec14 (patch)
tree7442af1882f97b8bbed412a60be31a58bb80d81a
parentd84412caa5ac3fd6af129d6dc4d21b3c6dcf1918 (diff)
downloadchrome-ec-b27e04aff8b4a30ff96749b6db722d6dffc3ec14.tar.gz
zephyr: Get zephyr BUILD.py files to 0 warnings
Create a .pylintrc and fix all docstring warnings. BRANCH=None BUG=b:217969201 TEST=find zephyr/projects zephyr/test -name '*.py' -print | xargs cros lint Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I43eb7b62032463f5ffeda1f8c5ac95722ac43f8b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581654 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--zephyr/projects/.pylintrc21
-rw-r--r--zephyr/projects/brya/BUILD.py3
-rw-r--r--zephyr/projects/corsola/BUILD.py3
-rw-r--r--zephyr/projects/herobrine/BUILD.py3
-rw-r--r--zephyr/projects/intelrvp/BUILD.py3
-rw-r--r--zephyr/projects/it8xxx2_evb/BUILD.py2
-rw-r--r--zephyr/projects/nissa/BUILD.py3
-rw-r--r--zephyr/projects/npcx_evb/npcx7/BUILD.py2
-rw-r--r--zephyr/projects/npcx_evb/npcx9/BUILD.py2
-rw-r--r--zephyr/projects/posix-ec/BUILD.py2
-rw-r--r--zephyr/projects/skyrim/BUILD.py3
-rw-r--r--zephyr/projects/trogdor/lazor/BUILD.py2
-rw-r--r--zephyr/test/.pylintrc21
-rw-r--r--zephyr/test/accel_cal/BUILD.py2
-rw-r--r--zephyr/test/ap_power/BUILD.py2
-rw-r--r--zephyr/test/base32/BUILD.py2
-rw-r--r--zephyr/test/crc/BUILD.py2
-rw-r--r--zephyr/test/drivers/BUILD.py2
-rw-r--r--zephyr/test/ec_app/BUILD.py2
-rw-r--r--zephyr/test/hooks/BUILD.py2
-rw-r--r--zephyr/test/i2c/BUILD.py2
-rw-r--r--zephyr/test/i2c_dts/BUILD.py2
-rw-r--r--zephyr/test/math/BUILD.py2
-rw-r--r--zephyr/test/system/BUILD.py2
-rw-r--r--zephyr/test/tasks/BUILD.py2
25 files changed, 94 insertions, 0 deletions
diff --git a/zephyr/projects/.pylintrc b/zephyr/projects/.pylintrc
new file mode 100644
index 0000000000..9ca0b5f8c9
--- /dev/null
+++ b/zephyr/projects/.pylintrc
@@ -0,0 +1,21 @@
+[MASTER]
+init-hook='import sys; sys.path.append("/usr/lib64/python3.6/site-packages")'
+
+[MESSAGES CONTROL]
+
+disable=bad-continuation,bad-whitespace,format,fixme
+
+[format]
+
+max-line-length=88
+string-quote=double
+
+[BASIC]
+additional-builtins=
+ here,
+ register_binman_project,
+ register_host_project,
+ register_host_test,
+ register_npcx_project,
+ register_raw_project,
+good-names=BUILD
diff --git a/zephyr/projects/brya/BUILD.py b/zephyr/projects/brya/BUILD.py
index da7e8b1d49..ead03c459f 100644
--- a/zephyr/projects/brya/BUILD.py
+++ b/zephyr/projects/brya/BUILD.py
@@ -2,8 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for brya."""
+
def register_npcx9_variant(project_name, extra_dts_overlays=(), extra_kconfig_files=()):
+ """Register a variant of a brya, even though this is not named as such."""
return register_npcx_project(
project_name=project_name,
zephyr_board="npcx9",
diff --git a/zephyr/projects/corsola/BUILD.py b/zephyr/projects/corsola/BUILD.py
index af0e0edf4b..6a8ed60c09 100644
--- a/zephyr/projects/corsola/BUILD.py
+++ b/zephyr/projects/corsola/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for corsola."""
+
# Default chip is it8xxx2, some variants will use NPCX9X.
@@ -11,6 +13,7 @@ def register_corsola_project(
extra_dts_overlays=(),
extra_kconfig_files=(),
):
+ """Register a variant of corsola."""
register_func = register_binman_project
if chip.startswith("npcx9"):
register_func = register_npcx_project
diff --git a/zephyr/projects/herobrine/BUILD.py b/zephyr/projects/herobrine/BUILD.py
index f2c86014ab..6245fc9e00 100644
--- a/zephyr/projects/herobrine/BUILD.py
+++ b/zephyr/projects/herobrine/BUILD.py
@@ -2,8 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for herobrine."""
+
def register_variant(project_name, extra_dts_overlays=(), extra_kconfig_files=()):
+ """Register a variant of herobrine."""
register_npcx_project(
project_name=project_name,
zephyr_board="npcx9",
diff --git a/zephyr/projects/intelrvp/BUILD.py b/zephyr/projects/intelrvp/BUILD.py
index 89ddd46970..1d052f2b55 100644
--- a/zephyr/projects/intelrvp/BUILD.py
+++ b/zephyr/projects/intelrvp/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for intelrvp."""
+
# intelrvp has adlrvp_npcx, adlrvpp_ite, adlrvpp_mchp etc
@@ -11,6 +13,7 @@ def register_intelrvp_project(
extra_dts_overlays=(),
extra_kconfig_files=(),
):
+ """Register a variant of intelrvp."""
register_func = register_binman_project
if chip.startswith("npcx9"):
register_func = register_npcx_project
diff --git a/zephyr/projects/it8xxx2_evb/BUILD.py b/zephyr/projects/it8xxx2_evb/BUILD.py
index 9d488776be..3dea4d9c20 100644
--- a/zephyr/projects/it8xxx2_evb/BUILD.py
+++ b/zephyr/projects/it8xxx2_evb/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for it8xxx2_evb."""
+
register_raw_project(
project_name="it8xxx2_evb",
zephyr_board="it8xxx2_evb",
diff --git a/zephyr/projects/nissa/BUILD.py b/zephyr/projects/nissa/BUILD.py
index 618b6401b1..6b8cc39dbf 100644
--- a/zephyr/projects/nissa/BUILD.py
+++ b/zephyr/projects/nissa/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for nissa."""
+
# Nivviks has NPCX993F, Nereid has ITE81302
@@ -11,6 +13,7 @@ def register_nissa_project(
extra_dts_overlays=(),
extra_kconfig_files=(),
):
+ """Register a variant of nissa."""
register_func = register_binman_project
if chip.startswith("npcx9"):
register_func = register_npcx_project
diff --git a/zephyr/projects/npcx_evb/npcx7/BUILD.py b/zephyr/projects/npcx_evb/npcx7/BUILD.py
index a8e671609c..89afed0fc1 100644
--- a/zephyr/projects/npcx_evb/npcx7/BUILD.py
+++ b/zephyr/projects/npcx_evb/npcx7/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for npcx7_evb."""
+
register_npcx_project(
project_name="npcx7",
zephyr_board="npcx7_evb",
diff --git a/zephyr/projects/npcx_evb/npcx9/BUILD.py b/zephyr/projects/npcx_evb/npcx9/BUILD.py
index fb1b2707d8..efd96c9020 100644
--- a/zephyr/projects/npcx_evb/npcx9/BUILD.py
+++ b/zephyr/projects/npcx_evb/npcx9/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for npcx9_evb."""
+
register_npcx_project(
project_name="npcx9",
zephyr_board="npcx9_evb",
diff --git a/zephyr/projects/posix-ec/BUILD.py b/zephyr/projects/posix-ec/BUILD.py
index b94d087642..a324f2ad39 100644
--- a/zephyr/projects/posix-ec/BUILD.py
+++ b/zephyr/projects/posix-ec/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for posix-ec."""
+
register_host_project(project_name="posix-ec")
diff --git a/zephyr/projects/skyrim/BUILD.py b/zephyr/projects/skyrim/BUILD.py
index e206bdd0d5..708109590d 100644
--- a/zephyr/projects/skyrim/BUILD.py
+++ b/zephyr/projects/skyrim/BUILD.py
@@ -2,8 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for skyrim."""
+
def register_variant(project_name):
+ """Register a variant of skyrim."""
register_npcx_project(
project_name=project_name,
zephyr_board="npcx9",
diff --git a/zephyr/projects/trogdor/lazor/BUILD.py b/zephyr/projects/trogdor/lazor/BUILD.py
index dabaddc236..13446cb702 100644
--- a/zephyr/projects/trogdor/lazor/BUILD.py
+++ b/zephyr/projects/trogdor/lazor/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Define zmake projects for lazor."""
+
register_npcx_project(
project_name="lazor",
zephyr_board="npcx7",
diff --git a/zephyr/test/.pylintrc b/zephyr/test/.pylintrc
new file mode 100644
index 0000000000..9ca0b5f8c9
--- /dev/null
+++ b/zephyr/test/.pylintrc
@@ -0,0 +1,21 @@
+[MASTER]
+init-hook='import sys; sys.path.append("/usr/lib64/python3.6/site-packages")'
+
+[MESSAGES CONTROL]
+
+disable=bad-continuation,bad-whitespace,format,fixme
+
+[format]
+
+max-line-length=88
+string-quote=double
+
+[BASIC]
+additional-builtins=
+ here,
+ register_binman_project,
+ register_host_project,
+ register_host_test,
+ register_npcx_project,
+ register_raw_project,
+good-names=BUILD
diff --git a/zephyr/test/accel_cal/BUILD.py b/zephyr/test/accel_cal/BUILD.py
index bb50fd4301..8c743bf48b 100644
--- a/zephyr/test/accel_cal/BUILD.py
+++ b/zephyr/test/accel_cal/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for accel_cal test."""
+
register_host_test("accel_cal")
diff --git a/zephyr/test/ap_power/BUILD.py b/zephyr/test/ap_power/BUILD.py
index f511b313ef..e3dac8c77e 100644
--- a/zephyr/test/ap_power/BUILD.py
+++ b/zephyr/test/ap_power/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for ap_power test."""
+
register_host_test("ap_power", dts_overlays=["overlay.dts"])
diff --git a/zephyr/test/base32/BUILD.py b/zephyr/test/base32/BUILD.py
index 67e7c50089..28023ccdc9 100644
--- a/zephyr/test/base32/BUILD.py
+++ b/zephyr/test/base32/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for base32 test."""
+
register_host_test("base32")
diff --git a/zephyr/test/crc/BUILD.py b/zephyr/test/crc/BUILD.py
index 17136be0ce..8ca9c04936 100644
--- a/zephyr/test/crc/BUILD.py
+++ b/zephyr/test/crc/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for crc test."""
+
register_host_test("crc")
diff --git a/zephyr/test/drivers/BUILD.py b/zephyr/test/drivers/BUILD.py
index 1653103526..04449e2f8e 100644
--- a/zephyr/test/drivers/BUILD.py
+++ b/zephyr/test/drivers/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for drivers test."""
+
register_host_test("drivers", dts_overlays=["overlay.dts"])
diff --git a/zephyr/test/ec_app/BUILD.py b/zephyr/test/ec_app/BUILD.py
index 48d072fe19..eeb85c0e46 100644
--- a/zephyr/test/ec_app/BUILD.py
+++ b/zephyr/test/ec_app/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for ec_app test."""
+
register_host_test("ec_app")
diff --git a/zephyr/test/hooks/BUILD.py b/zephyr/test/hooks/BUILD.py
index 6b20daea30..ee25ae52bc 100644
--- a/zephyr/test/hooks/BUILD.py
+++ b/zephyr/test/hooks/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for hooks test."""
+
register_host_test("hooks")
diff --git a/zephyr/test/i2c/BUILD.py b/zephyr/test/i2c/BUILD.py
index 150926dc69..86d9da537a 100644
--- a/zephyr/test/i2c/BUILD.py
+++ b/zephyr/test/i2c/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for i2c test."""
+
register_host_test("i2c", dts_overlays=["overlay.dts"])
diff --git a/zephyr/test/i2c_dts/BUILD.py b/zephyr/test/i2c_dts/BUILD.py
index ec93d8b6f7..e0e97be121 100644
--- a/zephyr/test/i2c_dts/BUILD.py
+++ b/zephyr/test/i2c_dts/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for i2c_dts test."""
+
register_host_test("i2c_dts", dts_overlays=["overlay.dts"])
diff --git a/zephyr/test/math/BUILD.py b/zephyr/test/math/BUILD.py
index 2b624b1bdd..8f6b28ce1a 100644
--- a/zephyr/test/math/BUILD.py
+++ b/zephyr/test/math/BUILD.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for math tests."""
+
register_host_test(
"math_fixed", kconfig_files=[here / "prj.conf", here / "fixed_point.conf"]
)
diff --git a/zephyr/test/system/BUILD.py b/zephyr/test/system/BUILD.py
index 1aecdeb37d..b9f14c2fcf 100644
--- a/zephyr/test/system/BUILD.py
+++ b/zephyr/test/system/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for system test."""
+
register_host_test("system", dts_overlays=["overlay.dts"])
diff --git a/zephyr/test/tasks/BUILD.py b/zephyr/test/tasks/BUILD.py
index 1f49d4b41d..9280101836 100644
--- a/zephyr/test/tasks/BUILD.py
+++ b/zephyr/test/tasks/BUILD.py
@@ -2,4 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Register zmake project for tasks test."""
+
register_host_test("tasks")