From 50cf70eea3405df080446177e81ac8531d2d06c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Tue, 11 Jun 2024 15:21:39 +0100 Subject: [PATCH] Check all python files for formatting issues --- .github/workflows/lint.yml | 6 ++---- pyproject.toml | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 33529fc7f..20847586a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -51,10 +51,8 @@ jobs: run: poetry install --only=format - name: Check code formatting - uses: liskin/gh-problem-matcher-wrap@v3 - with: - linters: isort - run: poe check-format ${{ needs.changed-files.outputs.changed_python_files }} + # the job output will contain colored diffs with what needs adjusting + run: poe check-format lint: if: needs.changed-files.outputs.any_python_changed == 'true' diff --git a/pyproject.toml b/pyproject.toml index 32e7def5b..3d8ae84b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -153,8 +153,9 @@ poetry = ">=1.8" # We use a default path '.' to make black and isort behave like flake8 and # mypy do: they act on the entire codebase (flake8 does it by default, and # mypy follows our configuration) by default. Positional command-line arguments -# override it. This allows us to check changed files _only_ in CI in a -# consistent way. +# override this. Therefore, locally you can run `poe check-format ` +# to quickly check a specific path. +# # Note: both tools respect .gitignore, therefore if we see them format # something unwanted locally, we should add these paths to .gitignore. [tool.poe.tasks._black]