summaryrefslogtreecommitdiff
path: root/zephyr/zmake/zmake/toolchains.py
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-04-12 14:17:45 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-12 22:10:00 +0000
commit205bf7ab0a862acff1ba964483c651b86e8406e5 (patch)
tree12ebdcb5ed5fe2ad6aa5620b60dcd6e9d5f9503b /zephyr/zmake/zmake/toolchains.py
parent36e6bbfe34443a3100e07db8479195cd9baa6d39 (diff)
downloadchrome-ec-205bf7ab0a862acff1ba964483c651b86e8406e5.tar.gz
zmake: Cleanup all the pylint warnings in zmake
Added type hints in several places either to correct a warning or to cause one. For example, if pylint can't tell the type of an inherited method, it will report unused params, but if the params match exactly the superclass, it will not. Some cases were because I tried to find all references to a class or function, and the IDE couldn't find them. Moved loose logging functions in multiproc into class methods of LogWriter. Refactored pack_firmware and _get_max_image_bytes to avoid problems with the various packers taking different numbers of params and subclasses not implemented abstract methods. Stop disabling no-self-use and fix them instead. Remove JobClient.run() because it's never called. Remove JobServer, because it does nothing and is not used as a marker. Fixed lots of small warnings also. Disabled most of the too-many-* warnings in specific functions. Fixed the imports in .pylintrc, as it was finding the emerged zmake, not the local one. Disabled wrong-import-order since isort and pylint don't agree. BRANCH=None BUG=b:217969201 TEST=zmake -j8 test -a zephyr/zmake/run_tests.sh find zephyr/zmake -name '*.py' -print0 | xargs -0 cros lint Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I4f1b3a9fa5881fe7bcc4a6065d326dd36701b5ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3583754 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/zmake/zmake/toolchains.py')
-rw-r--r--zephyr/zmake/zmake/toolchains.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/zephyr/zmake/zmake/toolchains.py b/zephyr/zmake/zmake/toolchains.py
index 13ee30de08..8ed1112e25 100644
--- a/zephyr/zmake/zmake/toolchains.py
+++ b/zephyr/zmake/zmake/toolchains.py
@@ -20,7 +20,8 @@ class GenericToolchain:
self.name = name
self.modules = modules or {}
- def probe(self): # pylint:disable=no-self-use
+ @staticmethod
+ def probe():
"""Probe if the toolchain is available on the system."""
# Since the toolchain is not known to zmake, we have no way to
# know if it's installed. Simply return False to indicate not