[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/22] iotests/297: Move pylint config into pylintrc
From: |
John Snow |
Subject: |
[PULL 01/22] iotests/297: Move pylint config into pylintrc |
Date: |
Mon, 1 Nov 2021 13:29:45 -0400 |
Move --score=n and --notes=XXX,FIXME into pylintrc. This pulls
configuration out of code, which I think is probably a good thing in
general.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-id: 20211019144918.3159078-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/qemu-iotests/297 | 4 +---
tests/qemu-iotests/pylintrc | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
index 91ec34d9521..bc3a0ceb2aa 100755
--- a/tests/qemu-iotests/297
+++ b/tests/qemu-iotests/297
@@ -65,10 +65,8 @@ def run_linters():
print('=== pylint ===')
sys.stdout.flush()
- # Todo notes are fine, but fixme's or xxx's should probably just be
- # fixed (in tests, at least)
env = os.environ.copy()
- subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX', *files),
+ subprocess.run(('pylint-3', *files),
env=env, check=False)
print('=== mypy ===')
diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
index 8cb4e1d6a6d..32ab77b8bb9 100644
--- a/tests/qemu-iotests/pylintrc
+++ b/tests/qemu-iotests/pylintrc
@@ -31,6 +31,22 @@ disable=invalid-name,
too-many-statements,
consider-using-f-string,
+
+[REPORTS]
+
+# Activate the evaluation score.
+score=no
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+# TODO notes are fine, but FIXMEs or XXXs should probably just be
+# fixed (in tests, at least).
+notes=FIXME,
+ XXX,
+
+
[FORMAT]
# Maximum number of characters on a single line.
--
2.31.1
- [PULL 00/22] Python patches, John Snow, 2021/11/01
- [PULL 01/22] iotests/297: Move pylint config into pylintrc,
John Snow <=
- [PULL 02/22] iotests/297: Split mypy configuration out into mypy.ini, John Snow, 2021/11/01
- [PULL 03/22] iotests/297: Add get_files() function, John Snow, 2021/11/01
- [PULL 04/22] iotests/297: Create main() function, John Snow, 2021/11/01
- [PULL 05/22] iotests/297: Don't rely on distro-specific linter binaries, John Snow, 2021/11/01
- [PULL 06/22] iotests/297: Split run_linters apart into run_pylint and run_mypy, John Snow, 2021/11/01
- [PULL 07/22] iotests/297: refactor run_[mypy|pylint] as generic execution shim, John Snow, 2021/11/01
- [PULL 08/22] iotests/297: Change run_linter() to raise an exception on failure, John Snow, 2021/11/01
- [PULL 09/22] iotests/297: update tool availability checks, John Snow, 2021/11/01
- [PULL 10/22] iotests/297: split test into sub-cases, John Snow, 2021/11/01
- [PULL 11/22] iotests: split linters.py out from 297, John Snow, 2021/11/01