summaryrefslogtreecommitdiff
path: root/extra
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
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')
-rwxr-xr-xextra/stack_analyzer/stack_analyzer.py4
-rwxr-xr-xextra/stack_analyzer/stack_analyzer_unittest.py4
-rw-r--r--extra/tigertool/ecusb/__init__.py4
-rw-r--r--extra/tigertool/ecusb/pty_driver.py4
-rw-r--r--extra/tigertool/ecusb/stm32uart.py4
-rw-r--r--extra/tigertool/ecusb/stm32usb.py4
-rw-r--r--extra/tigertool/ecusb/tiny_servo_common.py4
-rw-r--r--extra/tigertool/ecusb/tiny_servod.py4
-rwxr-xr-xextra/tigertool/tigertool.py4
-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
-rwxr-xr-xextra/usb_serial/console.py4
-rwxr-xr-xextra/usb_updater/fw_update.py4
-rwxr-xr-xextra/usb_updater/servo_updater.py4
18 files changed, 73 insertions, 0 deletions
diff --git a/extra/stack_analyzer/stack_analyzer.py b/extra/stack_analyzer/stack_analyzer.py
index 04c65174f8..77d16d5450 100755
--- a/extra/stack_analyzer/stack_analyzer.py
+++ b/extra/stack_analyzer/stack_analyzer.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
"""Statically analyze stack usage of EC firmware.
diff --git a/extra/stack_analyzer/stack_analyzer_unittest.py b/extra/stack_analyzer/stack_analyzer_unittest.py
index 09753625c9..c36fa9da45 100755
--- a/extra/stack_analyzer/stack_analyzer_unittest.py
+++ b/extra/stack_analyzer/stack_analyzer_unittest.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
"""Tests for Stack Analyzer classes and functions."""
diff --git a/extra/tigertool/ecusb/__init__.py b/extra/tigertool/ecusb/__init__.py
index c2af553d57..fe4dbc6749 100644
--- a/extra/tigertool/ecusb/__init__.py
+++ b/extra/tigertool/ecusb/__init__.py
@@ -1,5 +1,9 @@
# 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
__all__ = ['tiny_servo_common', 'stm32usb', 'stm32uart', 'pty_driver']
diff --git a/extra/tigertool/ecusb/pty_driver.py b/extra/tigertool/ecusb/pty_driver.py
index e5ff043aad..137cbc149b 100644
--- a/extra/tigertool/ecusb/pty_driver.py
+++ b/extra/tigertool/ecusb/pty_driver.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
"""ptyDriver class
diff --git a/extra/tigertool/ecusb/stm32uart.py b/extra/tigertool/ecusb/stm32uart.py
index fa0ed96820..95219455a9 100644
--- a/extra/tigertool/ecusb/stm32uart.py
+++ b/extra/tigertool/ecusb/stm32uart.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
"""Allow creation of uart/console interface via stm32 usb endpoint."""
diff --git a/extra/tigertool/ecusb/stm32usb.py b/extra/tigertool/ecusb/stm32usb.py
index 875251329f..bfd5fbb1fb 100644
--- a/extra/tigertool/ecusb/stm32usb.py
+++ b/extra/tigertool/ecusb/stm32usb.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
"""Allows creation of an interface via stm32 usb."""
diff --git a/extra/tigertool/ecusb/tiny_servo_common.py b/extra/tigertool/ecusb/tiny_servo_common.py
index dbbe42fea8..152c238bdf 100644
--- a/extra/tigertool/ecusb/tiny_servo_common.py
+++ b/extra/tigertool/ecusb/tiny_servo_common.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
"""Utilities for using lightweight console functions."""
diff --git a/extra/tigertool/ecusb/tiny_servod.py b/extra/tigertool/ecusb/tiny_servod.py
index aec87995a4..632d9c3a20 100644
--- a/extra/tigertool/ecusb/tiny_servod.py
+++ b/extra/tigertool/ecusb/tiny_servod.py
@@ -1,6 +1,10 @@
# Copyright 2020 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
"""Helper class to facilitate communication to servo ec console."""
diff --git a/extra/tigertool/tigertool.py b/extra/tigertool/tigertool.py
index 21b046c1d3..79aa30c3a4 100755
--- a/extra/tigertool/tigertool.py
+++ b/extra/tigertool/tigertool.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
"""Script to control tigertail USB-C Mux board."""
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."""
diff --git a/extra/usb_serial/console.py b/extra/usb_serial/console.py
index bd1fbaacc6..7b3bacd903 100755
--- a/extra/usb_serial/console.py
+++ b/extra/usb_serial/console.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
"""Allow creation of uart/console interface via usb google serial endpoint."""
diff --git a/extra/usb_updater/fw_update.py b/extra/usb_updater/fw_update.py
index ebc7623ac2..0d7a570fc3 100755
--- a/extra/usb_updater/fw_update.py
+++ b/extra/usb_updater/fw_update.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
# Upload firmware over USB
# Note: This is a py2/3 compatible file.
diff --git a/extra/usb_updater/servo_updater.py b/extra/usb_updater/servo_updater.py
index 20ef51803c..82b15c3250 100755
--- a/extra/usb_updater/servo_updater.py
+++ b/extra/usb_updater/servo_updater.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
# Note: This is a py2/3 compatible file.