summaryrefslogtreecommitdiff
path: root/extra/usb_power
diff options
context:
space:
mode:
authorCraig Hesling <hesling@chromium.org>2021-07-30 22:03:33 -0400
committerCommit Bot <commit-bot@chromium.org>2021-08-02 19:54:10 +0000
commit5af75662e7d236f887cbb1c295e4317fce00184b (patch)
treed28efdb402025cf3418ac5e6cf8545d156ca1ddc /extra/usb_power
parenta7a96fc737e40f110bee0a33299c982cdebc7014 (diff)
downloadchrome-ec-5af75662e7d236f887cbb1c295e4317fce00184b.tar.gz
pylintrc: Copy Chromium OS platform2's config
This requests that cros lint (and repo upload hook) use the new Chromium OS 4 space indent policy. Since legacy python scripts still use 2 space, I added pylint ignore statements to the individual files to disable indentation checking. Note: There are still valid pylint errors in some of these legacy scripts. BRANCH=none BUG=none TEST=cros lint util/*.py Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I439f5a87bc50f1f43a4996e574bbc0626922a88e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3064761 Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'extra/usb_power')
-rw-r--r--extra/usb_power/convert_power_log_board.py4
-rwxr-xr-xextra/usb_power/convert_servo_ina.py4
-rwxr-xr-xextra/usb_power/powerlog.py4
-rw-r--r--extra/usb_power/powerlog_unittest.py5
-rw-r--r--extra/usb_power/stats_manager.py4
-rw-r--r--extra/usb_power/stats_manager_unittest.py4
6 files changed, 25 insertions, 0 deletions
diff --git a/extra/usb_power/convert_power_log_board.py b/extra/usb_power/convert_power_log_board.py
index da0750ea86..8aab77ee4c 100644
--- a/extra/usb_power/convert_power_log_board.py
+++ b/extra/usb_power/convert_power_log_board.py
@@ -2,6 +2,10 @@
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
+# pylint: disable=bad-indentation,docstring-section-indent
+# pylint: disable=docstring-trailing-quotes
"""
Program to convert sweetberry config to servod config template.
diff --git a/extra/usb_power/convert_servo_ina.py b/extra/usb_power/convert_servo_ina.py
index 1dae2393a8..1c70f31aeb 100755
--- a/extra/usb_power/convert_servo_ina.py
+++ b/extra/usb_power/convert_servo_ina.py
@@ -2,6 +2,10 @@
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
+# pylint: disable=bad-indentation,docstring-section-indent
+# pylint: disable=docstring-trailing-quotes
"""Program to convert power logging config from a servo_ina device
to a sweetberry config.
diff --git a/extra/usb_power/powerlog.py b/extra/usb_power/powerlog.py
index c7fe7477a7..82cce3daed 100755
--- a/extra/usb_power/powerlog.py
+++ b/extra/usb_power/powerlog.py
@@ -2,6 +2,10 @@
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
+# pylint: disable=bad-indentation,docstring-section-indent
+# pylint: disable=docstring-trailing-quotes
"""Program to fetch power logging data from a sweetberry device
or other usb device that exports a USB power logging interface.
diff --git a/extra/usb_power/powerlog_unittest.py b/extra/usb_power/powerlog_unittest.py
index 7058c57aa7..1d0718530e 100644
--- a/extra/usb_power/powerlog_unittest.py
+++ b/extra/usb_power/powerlog_unittest.py
@@ -1,6 +1,11 @@
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
+# pylint: disable=bad-indentation,docstring-section-indent
+# pylint: disable=docstring-trailing-quotes
+
"""Unit tests for powerlog."""
import os
diff --git a/extra/usb_power/stats_manager.py b/extra/usb_power/stats_manager.py
index 9a4f4751fb..0f8c3fcb15 100644
--- a/extra/usb_power/stats_manager.py
+++ b/extra/usb_power/stats_manager.py
@@ -1,6 +1,10 @@
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
+# pylint: disable=bad-indentation,docstring-section-indent
+# pylint: disable=docstring-trailing-quotes
"""Calculates statistics for lists of data and pretty print them."""
diff --git a/extra/usb_power/stats_manager_unittest.py b/extra/usb_power/stats_manager_unittest.py
index f9e5e35c84..beb9984b93 100644
--- a/extra/usb_power/stats_manager_unittest.py
+++ b/extra/usb_power/stats_manager_unittest.py
@@ -1,6 +1,10 @@
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+#
+# Ignore indention messages, since legacy scripts use 2 spaces instead of 4.
+# pylint: disable=bad-indentation,docstring-section-indent
+# pylint: disable=docstring-trailing-quotes
"""Unit tests for StatsManager."""