aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-11-01 12:36:36 -0700
committerTim Newsome <tim@sifive.com>2017-11-01 12:36:36 -0700
commitcc4fb603a4c6c1c1ba92262763b68bbb91092ed3 (patch)
tree57ac57328fd8c7940ab72fda31e577dba2f2a8eb
parent97f13c98e7306882f013ab2f6524e483ce1dcceb (diff)
downloadriscv-tests-cc4fb603a4c6c1c1ba92262763b68bbb91092ed3.zip
riscv-tests-cc4fb603a4c6c1c1ba92262763b68bbb91092ed3.tar.gz
riscv-tests-cc4fb603a4c6c1c1ba92262763b68bbb91092ed3.tar.bz2
Make pylint 1.6.5 happy.
-rwxr-xr-xdebug/gdbserver.py2
-rw-r--r--debug/pylint.rc4
-rw-r--r--debug/targets.py2
-rw-r--r--debug/testlib.py3
4 files changed, 5 insertions, 6 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py
index eabf445..f2c84ae 100755
--- a/debug/gdbserver.py
+++ b/debug/gdbserver.py
@@ -207,7 +207,7 @@ class MemTestBlock(GdbTest):
self.gdb.command("dump ihex memory %s 0x%x 0x%x" % (b.name,
self.hart.ram, self.hart.ram + self.length))
self.gdb.command("shell cat %s" % b.name)
- for line in b:
+ for line in b.xreadlines():
record_type, address, line_data = ihex_parse(line)
if record_type == 0:
written_data = data[address:address+len(line_data)]
diff --git a/debug/pylint.rc b/debug/pylint.rc
index 193ea3a..8bbfe20 100644
--- a/debug/pylint.rc
+++ b/debug/pylint.rc
@@ -178,7 +178,7 @@ logging-modules=logging
[BASIC]
# Required attributes for module, separated by a comma
-required-attributes=
+#required-attributes=
# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,apply,input,file
@@ -287,7 +287,7 @@ int-import-graph=
# List of interface methods to ignore, separated by a comma. This is used for
# instance to not check methods defines in Zope's Interface base class.
-ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+#ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
diff --git a/debug/targets.py b/debug/targets.py
index 06688d8..eb6862b 100644
--- a/debug/targets.py
+++ b/debug/targets.py
@@ -173,7 +173,7 @@ def target(parsed):
found = []
for name in dir(module):
definition = getattr(module, name)
- if type(definition) == type and issubclass(definition, Target):
+ if isinstance(definition, type) and issubclass(definition, Target):
found.append(definition)
assert len(found) == 1, "%s does not define exactly one subclass of " \
"targets.Target" % parsed.target
diff --git a/debug/testlib.py b/debug/testlib.py
index e1be100..fae2132 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -555,7 +555,7 @@ def run_all_tests(module, target, parsed):
for name in dir(module):
definition = getattr(module, name)
- if type(definition) == type and hasattr(definition, 'test') and \
+ if isinstance(definition, type) and hasattr(definition, 'test') and \
(not parsed.test or any(test in name for test in parsed.test)):
todo.append((name, definition, None))
@@ -670,7 +670,6 @@ class BaseTest(object):
compile_args = getattr(self, 'compile_args', None)
if compile_args:
if compile_args not in BaseTest.compiled:
- # pylint: disable=star-args
BaseTest.compiled[compile_args] = \
self.target.compile(self.hart, *compile_args)
self.binary = BaseTest.compiled.get(compile_args)