From f75f4c4af906d5063f2b0998bdd852e45b41c3b9 Mon Sep 17 00:00:00 2001 From: Elliot <3186037+elliot-100@users.noreply.github.com> Date: Tue, 21 May 2024 17:43:17 +0100 Subject: [PATCH] ci: isort: use CLI interface instead of official `isort/isort-action` which appears to have bugs and config documentation gaps --- .github/workflows/python-package.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d985691..4d59654 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -32,10 +32,12 @@ jobs: - name: Install project run: poetry install - name: Lint imports with isort - # By default: exit with error if imports are not properly sorted - uses: isort/isort-action@master - with: - configuration: profile = black + # Use command line due to bugs/doc gaps with official `isort/isort-action`. + # Exit with error if the code is not properly formatted; show diffs; + # `black` compatibility + run: | + source $VENV + isort . --check-only --diff --profile black - name: Lint with black # by default: exit with error if the code is not properly formatted; show diffs uses: psf/black@stable