Check all python files for formatting issues

This commit is contained in:
Šarūnas Nejus 2024-06-11 15:21:39 +01:00
parent a4ed6ab62a
commit 50cf70eea3
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435
2 changed files with 5 additions and 6 deletions

View file

@ -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'

View file

@ -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 <some-path>`
# 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]