From 6522345f6d2927bb8bcf993866f12c7ea33fe6fd Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 11 Aug 2025 08:55:40 -0400 Subject: [PATCH] fix(common-lint): add problem matcher for nbqa flake8 --- .github/workflows/__call-common-lint.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/__call-common-lint.yml b/.github/workflows/__call-common-lint.yml index fdc81524..377965f6 100644 --- a/.github/workflows/__call-common-lint.yml +++ b/.github/workflows/__call-common-lint.yml @@ -356,12 +356,25 @@ jobs: - name: Python - nbqa flake8 if: always() - # TODO: add problem matcher: https://github.com/gustavgransbo/flake8-github-annotations/issues/11 run: | + echo "::group::problem matcher" + set +e + error=0 python -m nbqa flake8 \ - --color=always \ + --format=github \ --verbose \ . + error=$? + set -e + echo "::endgroup::" + + # run nbqa flake8 again with human friendly output if there were errors + if [ $error -ne 0 ]; then + python -m nbqa flake8 \ + --color=always \ + --verbose \ + . + fi - name: Python - nb-clean if: always()