From 6379f8a1638df7bfae57feef9998cefa7cb12ba2 Mon Sep 17 00:00:00 2001 From: JacobDomagala Date: Wed, 19 Feb 2025 15:17:49 +0100 Subject: [PATCH] [#126]: Run black --- .github/workflows/linter.yml | 2 -- .github/workflows/shellcheck.yml | 2 +- .github/workflows/test_action.yml | 1 - .github/workflows/unit_tests.yml | 2 -- src/sa_utils.py | 4 +++- src/static_analysis_cpp.py | 6 +++++- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fc0c240..0469509 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -35,5 +35,3 @@ jobs: extra-mypy-options: "--ignore-missing-imports --show-error-codes" extra-flake8-options: "--max-line-length=120 --ignore=E203,E402" extra-pycodestyle-options: "--max-line-length=120 --ignore=E203,E402" - - diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 4d3ffd0..5699a54 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -15,4 +15,4 @@ jobs: - name: Run ShellCheck uses: ludeeus/action-shellcheck@master with: - ignore_names: llvm.sh # External file \ No newline at end of file + ignore_names: llvm.sh # External file diff --git a/.github/workflows/test_action.yml b/.github/workflows/test_action.yml index c29f311..3af048c 100644 --- a/.github/workflows/test_action.yml +++ b/.github/workflows/test_action.yml @@ -74,4 +74,3 @@ jobs: *** ### [Result for pull_request_target (non CMake)](https://github.com/JacobDomagala/TestRepo/pull/7#issuecomment-1404101648) - diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 44bab2d..74957e3 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -23,5 +23,3 @@ jobs: - name: Test with pytest run: | pytest - - diff --git a/src/sa_utils.py b/src/sa_utils.py index 251da29..e6b376d 100644 --- a/src/sa_utils.py +++ b/src/sa_utils.py @@ -318,7 +318,9 @@ def create_or_edit_comment(comment_body): pull_request.create_issue_comment(body=comment_body) -def generate_output(is_note, prefix_and_file_path, file_line_start, file_line_end, description): +def generate_output( + is_note, prefix_and_file_path, file_line_start, file_line_end, description +): """ Generate a formatted output string based on the details of a code issue. diff --git a/src/static_analysis_cpp.py b/src/static_analysis_cpp.py index 0a0b301..ff8fa5b 100644 --- a/src/static_analysis_cpp.py +++ b/src/static_analysis_cpp.py @@ -64,7 +64,11 @@ def create_comment_for_output( ) was_note = is_note new_line = utils.generate_output( - is_note, (prefix, file_path), file_line_start, file_line_end, description + is_note, + (prefix, file_path), + file_line_start, + file_line_end, + description, ) if utils.check_for_char_limit(new_line):