[elbe-devel] [PATCH 45/75] junit: Fix Pylint
Olivier Dion
dion at linutronix.de
Mon May 25 17:42:38 CEST 2020
14:0: R0205: (useless-object-inheritance)
48:12: W0612: (unused-variable)
57:0: R0205: (useless-object-inheritance)
62:54: E1101: (no-member)
70:51: E1101: (no-member)
Signed-off-by: Olivier Dion <dion at linutronix.de>
squash! junit: Fix Pylint
---
elbepack/junit.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/elbepack/junit.py b/elbepack/junit.py
index ab759332..0195701f 100644
--- a/elbepack/junit.py
+++ b/elbepack/junit.py
@@ -10,7 +10,8 @@ import junit_xml as junit
class TestException(Exception):
pass
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
class TestSuite(object):
test_dict = {}
@@ -45,14 +46,14 @@ class TestSuite(object):
for test in self.node:
try:
test_cases.append(self.do_test(test, self.target))
- except TestException as E:
+ except TestException:
pass # TODO - Handle me!
ts = junit.TestSuite(name=self.node.et.attrib["name"],
test_cases=test_cases)
return ts
-
-#pylint: disable=too-few-public-methods,no-member
+# TODO:py3 - Remove object inheritance
+# pylint: disable=useless-object-inheritance
@TestSuite.register("BaseTest", register=False)
class BaseTest(object):
@@ -62,6 +63,8 @@ class BaseTest(object):
self.target = target
def __call__(self):
+ # self.tag is defined in registration
+ # pylint: disable=no-member
raise TestException("Unimplemented Test %s" % self.tag)
@@ -70,6 +73,8 @@ class TestFileExists(BaseTest):
def __call__(self):
path = self.node.et.text
+ # self.tag is defined in registration
+ # pylint: disable=no-member
test = junit.TestCase(name=path, classname=self.tag)
if not self.target.exists(path):
test.add_failure_info(message="FAILED")
--
2.26.2
More information about the elbe-devel
mailing list