aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug/pylint.rc54
-rw-r--r--debug/testlib.py15
2 files changed, 8 insertions, 61 deletions
diff --git a/debug/pylint.rc b/debug/pylint.rc
index cf07149..49e5af1 100644
--- a/debug/pylint.rc
+++ b/debug/pylint.rc
@@ -7,9 +7,6 @@
# pygtk.require().
#init-hook=
-# Profiled execution.
-profile=no
-
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=.git
@@ -47,7 +44,7 @@ extension-pkg-whitelist=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
-disable=bad-continuation, missing-docstring, invalid-name, locally-disabled,
+disable=missing-docstring, invalid-name, locally-disabled,
too-few-public-methods, too-many-arguments, fixme, duplicate-code,
no-else-return
@@ -59,11 +56,6 @@ disable=bad-continuation, missing-docstring, invalid-name, locally-disabled,
# mypackage.mymodule.MyReporterClass.
output-format=text
-# Put messages in a separate file for each module / package specified on the
-# command line instead of printing them on stdout. Reports (if any) will be
-# written in a file name "pylint_global.[txt|html]".
-files-output=no
-
# Tells whether to display a full report or only the messages
reports=no
@@ -74,10 +66,6 @@ reports=no
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-# Add a comment according to your evaluation note. This is used by the global
-# evaluation report (RP0004).
-comment=no
-
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=
@@ -133,10 +121,6 @@ ignored-modules=
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject
-# When zope mode is activated, add a predefined set of Zope acquired attributes
-# to generated-members.
-zope=no
-
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed. Python regular
# expressions are accepted.
@@ -155,9 +139,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# else.
single-line-if-stmt=no
-# List of optional constructs for which whitespace checking is disabled
-no-space-check=trailing-comma,dict-separator
-
# Maximum number of lines in a module
max-module-lines=10000
@@ -181,9 +162,6 @@ logging-modules=logging
# Required attributes for module, separated by a comma
#required-attributes=
-# List of builtins function names that should not be used, separated by a comma
-bad-functions=map,filter,apply,input,file
-
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_
@@ -200,63 +178,33 @@ include-naming-hint=no
# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$
-# Naming hint for function names
-function-name-hint=[a-z_][a-z0-9_]{2,30}$
-
# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$
-# Naming hint for variable names
-variable-name-hint=[a-z_][a-z0-9_]{2,30}$
-
# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-# Naming hint for constant names
-const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-
# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$
-# Naming hint for attribute names
-attr-name-hint=[a-z_][a-z0-9_]{2,30}$
-
# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
-# Naming hint for argument names
-argument-name-hint=[a-z_][a-z0-9_]{2,30}$
-
# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
-# Naming hint for class attribute names
-class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
-
# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-# Naming hint for inline iteration names
-inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
-
# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
-# Naming hint for class names
-class-name-hint=[A-Z_][a-zA-Z0-9]+$
-
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-# Naming hint for module names
-module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$
-# Naming hint for method names
-method-name-hint=[a-z_][a-z0-9_]{2,30}$
-
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=__.*__
diff --git a/debug/testlib.py b/debug/testlib.py
index f96cefb..5137096 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -9,7 +9,6 @@ import sys
import tempfile
import time
import traceback
-import pipes
import pexpect
@@ -119,7 +118,6 @@ class Spike:
# pylint: disable=too-many-branches
def command(self, target, halted, timeout, with_jtag_gdb):
- # pylint: disable=no-self-use
if target.sim_cmd:
cmd = shlex.split(target.sim_cmd)
else:
@@ -358,7 +356,7 @@ class Openocd:
parts = [
" ".join(f"{key}={os.environ[key]}" for key in env_entries),
" ".join(f"{k}={v}" for k, v in extra_env.items()),
- " ".join(map(pipes.quote, cmd))
+ " ".join(map(shlex.quote, cmd))
]
logfile.write(("+ " + " ".join(parts) + "\n").encode())
logfile.flush()
@@ -509,7 +507,10 @@ def tokenize(text):
(r"0x[\da-fA-F]+", lambda m: int(m.group(0)[2:], 16)),
(r"-?\d*\.\d+(e[-+]\d+)?", lambda m: float(m.group(0))),
(r"-?\d+", lambda m: int(m.group(0))),
- (r"-?nan\(0x[a-f0-9]+\)", lambda m: float("nan")),
+ # We want something that can compare equal, and float(nan) does
+ # not do that. So use something else that isn't good for math,
+ # but we don't actually do math with NaN.
+ (r"-?nan\(0x[a-f0-9]+\)", lambda m: "nan"),
(r"<repeats (\d+) times>", lambda m: Repeat(int(m.group(1)))),
(r"Could not fetch register \"(\w+)\"; (.*)$",
lambda m: CouldNotFetch(m.group(1), m.group(2))),
@@ -669,8 +670,8 @@ class Gdb:
self.command("disconnect")
def __del__(self):
- for child in self.children:
- del child
+ for i, _ in enumerate(self.children):
+ del self.children[i]
def one_hart_per_gdb(self):
return all(h['solo'] for h in self.harts.values())
@@ -1100,13 +1101,11 @@ class BaseTest:
def early_applicable(self):
"""Return a false value if the test has determined it cannot run
without ever needing to talk to the target or server."""
- # pylint: disable=no-self-use
return True
def freertos(self):
"""Return a true value if the test is running a FreeRTOS binary where
the debugger should expose FreeRTOS threads to gdb."""
- # pylint: disable=no-self-use
return False
def setup(self):