aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/kunit/kunit_json.py
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2022-05-09 13:49:09 -0700
committerShuah Khan <skhan@linuxfoundation.org>2022-05-16 13:22:36 -0600
commit0453f984a7b9458f0e469afb039f2841308b1bef (patch)
tree37cbf2c09f11c5b0482c7b8ffa096e6d48571307 /tools/testing/kunit/kunit_json.py
parentkunit: tool: minor cosmetic cleanups in kunit_parser.py (diff)
downloadwireguard-linux-0453f984a7b9458f0e469afb039f2841308b1bef.tar.xz
wireguard-linux-0453f984a7b9458f0e469afb039f2841308b1bef.zip
kunit: tool: misc cleanups
This primarily comes from running pylint over kunit tool code and ignoring some warnings we don't care about. If we ever got a fully clean setup, we could add this to run_checks.py, but we're not there yet. Fix things like * Drop unused imports * check `is None`, not `== None` (see PEP 8) * remove redundant parens around returns * remove redundant `else` / convert `elif` to `if` where appropriate * rename make_arch_qemuconfig() param to base_kunitconfig (this is the name used in the subclass, and it's a better one) * kunit_tool_test: check the exit code for SystemExit (could be 0) Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit/kunit_json.py')
-rw-r--r--tools/testing/kunit/kunit_json.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/kunit/kunit_json.py b/tools/testing/kunit/kunit_json.py
index 1212423fe6bc..10ff65689dd8 100644
--- a/tools/testing/kunit/kunit_json.py
+++ b/tools/testing/kunit/kunit_json.py
@@ -8,12 +8,9 @@
from dataclasses import dataclass
import json
-import os
-
-import kunit_parser
+from typing import Any, Dict
from kunit_parser import Test, TestStatus
-from typing import Any, Dict
@dataclass
class Metadata: