test: Correct pylint errors

Fix pylint errors in all test.

This requires adding a get_spawn() method to the ConsoleBase base, so that
its subclass is happy.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2022-02-11 13:23:23 -07:00 committed by Tom Rini
parent 68a0b7156a
commit 9e0077796f
4 changed files with 15 additions and 6 deletions

View file

@ -115,6 +115,14 @@ class ConsoleBase(object):
self.at_prompt = False
self.at_prompt_logevt = None
def get_spawn(self):
# This is not called, ssubclass must define this.
# Return a value to avoid:
# u_boot_console_base.py:348:12: E1128: Assigning result of a function
# call, where the function returns None (assignment-from-none)
return u_boot_spawn.Spawn([])
def eval_bad_patterns(self):
self.bad_patterns = [pat[PAT_RE] for pat in bad_pattern_defs \
if self.disable_check_count[pat[PAT_ID]] == 0]