[Piglit] [PATCH 21/21] all.py: disable pylint's bad-continuation error

Dylan Baker baker.dylan.c at gmail.com
Tue Feb 24 17:34:53 PST 2015


This is a bug (https://bitbucket.org/logilab/pylint/issue/461/incorrect-hanging-indent-detection-with)
that misdetects the hanging indent of the context manager. This silences
roughly 300 warnings.

v2: - also turn this warning off in quick.py

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/all.py   | 6 ++++++
 tests/quick.py | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/tests/all.py b/tests/all.py
index fd69b6e..ea588ce 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -14,6 +14,12 @@ from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
 
 __all__ = ['profile']
 
+# Disable bad hanging indent errors in pylint
+# There is a bug in pyling which causes the profile.group_manager to be tagged
+# as bad hanging indent, even though it seems to be correct (and similar syntax
+# doesn't trigger an error)
+# pylint: disable=bad-continuation
+
 
 def add_single_param_test_set(adder, name, *params):
     for param in params:
diff --git a/tests/quick.py b/tests/quick.py
index 41790c5..5393a2b 100644
--- a/tests/quick.py
+++ b/tests/quick.py
@@ -6,6 +6,9 @@ from tests.all import profile
 
 __all__ = ['profile']
 
+# See the note in all.py about this warning
+# pylint: disable=bad-continuation
+
 GleanTest.GLOBAL_PARAMS += ["--quick"]
 
 # Set the --quick flag on a few image_load_store_tests
-- 
2.3.0



More information about the Piglit mailing list