From 111d527c332a43832477d5e0a073829a7dd81f48 Mon Sep 17 00:00:00 2001 From: Dmitry Belyaev Date: Sat, 4 Jun 2022 23:43:13 +0300 Subject: [PATCH] check formatting with black (#99) * check formatting with black + suggest on pr * test format check * fix test format error suggested by reviewdog[black] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/pythonpackage.yml | 3 +++ .github/workflows/reviewdog.yml | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 4e47bb5..f474382 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -49,6 +49,9 @@ jobs: run: | poetry run mypy --strict --pretty . || true + - name: Check formatting with black + run: poetry run black --check --diff --color . + - name: Upload mypy report uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index ab7d9a1..bdd4411 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -39,3 +39,11 @@ jobs: with: reporter: github-pr-review level: warning + + - name: format with black + run: poetry run black . + + - name: suggester / black + uses: reviewdog/action-suggester@v1 + with: + tool_name: black