From f42fb21ed494cfea32ea40ebff8d682bcd2b41bb Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 27 Jun 2023 09:31:43 -0700 Subject: Pylint fixes. --- debug/testlib.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/debug/testlib.py b/debug/testlib.py index 1899b20..fc7e9af 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -952,14 +952,17 @@ def load_excluded_tests(excluded_tests_file, target_name): return result target_excludes = {} - with open(excluded_tests_file) as file: + with open(excluded_tests_file, encoding="utf-8") as file: raw_data = yaml.safe_load(file) for (target, test_list) in raw_data.items(): if not isinstance(test_list, list): - raise ValueError(f"Target {target!r} does not contain a test list", excluded_tests_file, test_list) + raise ValueError( + f"Target {target!r} does not contain a test list", + excluded_tests_file, test_list) if not all(isinstance(s, str) for s in test_list): - raise ValueError(f"Not every element in the target test list {target!r} is a string", - excluded_tests_file, test_list) + raise ValueError( + f"Not every element in the target test list {target!r} " + "is a string", excluded_tests_file, test_list) target_excludes.update(raw_data) -- cgit v1.1 From fe15afe59efbd4a94fbd0f0855825e45a11775a6 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 27 Jun 2023 09:32:05 -0700 Subject: Github workflow to run pylint against debug tests --- .github/workflows/debug.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/debug.yml diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml new file mode 100644 index 0000000..29ca5b2 --- /dev/null +++ b/.github/workflows/debug.yml @@ -0,0 +1,17 @@ +on: pull_request + +name: Check Code Style (checkpatch) + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install required packages (pip3) + run: | + pip3 install pylint + - name: Run pylint + run: make -C debug pylint -- cgit v1.1