From 39e269e989a1d64f2075891c837a06d752968c53 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 1 Feb 2024 14:39:21 +0100 Subject: [PATCH 1/4] Issue #16 #22 GH action lint: check with darker iso black --- .github/workflows/lint.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8462b37..aca4120 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,10 +21,12 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - python -m pip install isort black ruff + python -m pip install isort darker ruff - name: isort run: python -m isort . --check --diff - # - name: black - # run: python -m black --check --diff . - name: ruff run: ruff check . + - name: darker + # For now, run "darker" (iso "black") + # to only check formatting of edited/new code + run: python -m darker --check --diff . From 74ee3fecb4009feee1e5ed5c73be7fccb19d70a6 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 1 Feb 2024 14:43:10 +0100 Subject: [PATCH 2/4] fixup! Issue #16 #22 GH action lint: check with darker iso black --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index aca4120..792c23a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,7 +21,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - python -m pip install isort darker ruff + python -m pip install isort ruff 'darker==1.7.2' - name: isort run: python -m isort . --check --diff - name: ruff From b0ce57a99c33a3be1a019cf7b3dc2d1235286c90 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 1 Feb 2024 14:52:27 +0100 Subject: [PATCH 3/4] fixup! fixup! Issue #16 #22 GH action lint: check with darker iso black --- .github/workflows/lint.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 792c23a..5e4f61b 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -29,4 +29,6 @@ jobs: - name: darker # For now, run "darker" (iso "black") # to only check formatting of edited/new code - run: python -m darker --check --diff . + # TODO: consider using the official action `uses: akaihola/darker@...` + # as documented on https://github.com/akaihola/darker/blob/master/README.rst + run: python -m darker --check --diff -r 'master...' . From d66754c779b487945fae2157ba864bc051ca6e68 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 1 Feb 2024 15:01:57 +0100 Subject: [PATCH 4/4] fixup! fixup! fixup! Issue #16 #22 GH action lint: check with darker iso black --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 5e4f61b..b7a9d50 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -31,4 +31,4 @@ jobs: # to only check formatting of edited/new code # TODO: consider using the official action `uses: akaihola/darker@...` # as documented on https://github.com/akaihola/darker/blob/master/README.rst - run: python -m darker --check --diff -r 'master...' . + run: python -m darker --check --diff -r 'main...' .