From b38eeea94fbfcf800e5bb179ace9b5bf39c2390b Mon Sep 17 00:00:00 2001 From: Hudson Cooper Date: Thu, 18 Sep 2025 12:55:52 -0700 Subject: [PATCH 1/3] ARG --- ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index 5ac982706..dba8a0487 100644 --- a/ruff.toml +++ b/ruff.toml @@ -17,7 +17,7 @@ exclude = [ select = [ "B", # flake8-bugbear "I", # isort - # "ARG", # flake8-unused-arguments + "ARG", # flake8-unused-arguments "C4", # flake8-comprehensions "F401", # flake8-unused-imports "F541", # flake8 f-string without any placeholders From 6ca9b476044233ae8809bf77a79859034e0fa42e Mon Sep 17 00:00:00 2001 From: Hudson Cooper Date: Thu, 18 Sep 2025 13:13:50 -0700 Subject: [PATCH 2/3] warning --- .github/workflows/code_quality.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index d67f182d3..e4e68e1ca 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -65,8 +65,6 @@ jobs: } }) - # Have a separate workflow because we don't want to enforce this at all - # It will have too many errors initially and is likely to deter contributors ruff-linting: name: Linting with ruff runs-on: ubuntu-latest @@ -81,10 +79,31 @@ jobs: run: pip install -e .[dev] - name: Run ruff linting shell: bash + id: ruff_lint continue-on-error: true run: | - ruff check - + if ! ruff check; then + echo "::warning title=ruff lint::Ruff found linting issues)" + exit 78 # no longer works in github, but would mark action step with a warning + fi + - name: Mark step with a warning + if: ${{ steps.ruff_lint.outcome == 'failure' }} + uses: actions/github-script@v6 + with: + script: | + await github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: 'Failed ruff linting', + head_sha: context.sha, + status: 'completed', + conclusion: 'neutral', + completed_at: new Date().toISOString(), + output: { + title: 'ruff found linting issues', + summary: 'Run `ruff check` locally and fix the issues.' + } + }) run-mypy: name: Run informational mypy From d635b50183f4cfef53a7577eb94eee52dfbe59d8 Mon Sep 17 00:00:00 2001 From: Hudson Cooper Date: Thu, 18 Sep 2025 13:18:22 -0700 Subject: [PATCH 3/3] ? --- .github/workflows/code_quality.yml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index e4e68e1ca..aee4cef39 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -83,27 +83,9 @@ jobs: continue-on-error: true run: | if ! ruff check; then - echo "::warning title=ruff lint::Ruff found linting issues)" + echo "::warning title=ruff lint::Ruff found linting issues" exit 78 # no longer works in github, but would mark action step with a warning fi - - name: Mark step with a warning - if: ${{ steps.ruff_lint.outcome == 'failure' }} - uses: actions/github-script@v6 - with: - script: | - await github.rest.checks.create({ - owner: context.repo.owner, - repo: context.repo.repo, - name: 'Failed ruff linting', - head_sha: context.sha, - status: 'completed', - conclusion: 'neutral', - completed_at: new Date().toISOString(), - output: { - title: 'ruff found linting issues', - summary: 'Run `ruff check` locally and fix the issues.' - } - }) run-mypy: name: Run informational mypy