From 7b9f7584da9b2140650d16346c7362e18e2f6a8a Mon Sep 17 00:00:00 2001 From: TT <70463940+Herrtian@users.noreply.github.com> Date: Thu, 14 May 2026 18:36:41 +0200 Subject: [PATCH 1/7] Document rule selection args (#167) Closes #107. Adds a short README example for passing rule-selection options through the Ruff hook args, including quoted comma-separated values in inline YAML. Checks: git diff --check; parsed the YAML example. --------- Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com> --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 716f813..a42399a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,20 @@ repos: - id: ruff-format ``` +To select or ignore specific rules, pass the relevant Ruff arguments through `args`. +When using inline YAML lists, quote arguments that contain commas: + +```yaml +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.15.13 + hooks: + # Run the linter. + - id: ruff-check + args: [ --fix, "--extend-select=I,E", "--ignore=F401" ] +``` + To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes: ```yaml From 0c7b6c989466a93942def1f84baf36ddfcd60c83 Mon Sep 17 00:00:00 2001 From: astral-versions-bot Date: Thu, 21 May 2026 14:36:22 +0000 Subject: [PATCH 2/7] Mirror: 0.15.14 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a42399a..cf7afcf 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # ruff-pre-commit [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![image](https://img.shields.io/pypi/v/ruff/0.15.13.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.15.13.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.13.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.15.14.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.15.14.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.14.svg)](https://pypi.python.org/pypi/ruff) [![Actions status](https://github.com/astral-sh/ruff-pre-commit/workflows/main/badge.svg)](https://github.com/astral-sh/ruff-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff). @@ -20,7 +20,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.13 + rev: v0.15.14 hooks: # Run the linter. - id: ruff-check @@ -34,7 +34,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.13 + rev: v0.15.14 hooks: # Run the linter. - id: ruff-check @@ -50,7 +50,7 @@ When using inline YAML lists, quote arguments that contain commas: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.13 + rev: v0.15.14 hooks: # Run the linter. - id: ruff-check @@ -63,7 +63,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.13 + rev: v0.15.14 hooks: # Run the linter. - id: ruff-check @@ -80,7 +80,7 @@ To lint `pyproject.toml`, add `pyproject` to the list of allowed filetypes (requ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.13 + rev: v0.15.14 hooks: # Run the linter. - id: ruff-check diff --git a/pyproject.toml b/pyproject.toml index b01053c..98b0c00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.15.13", + "ruff==0.15.14", ] From 0671d8ab202c4ac093b78433ae5baf74f3fc7246 Mon Sep 17 00:00:00 2001 From: astral-versions-bot Date: Thu, 28 May 2026 14:18:31 +0000 Subject: [PATCH 3/7] Mirror: 0.15.15 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cf7afcf..b50bbae 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # ruff-pre-commit [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![image](https://img.shields.io/pypi/v/ruff/0.15.14.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.15.14.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.14.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.15.15.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.15.15.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.15.svg)](https://pypi.python.org/pypi/ruff) [![Actions status](https://github.com/astral-sh/ruff-pre-commit/workflows/main/badge.svg)](https://github.com/astral-sh/ruff-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff). @@ -20,7 +20,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.14 + rev: v0.15.15 hooks: # Run the linter. - id: ruff-check @@ -34,7 +34,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.14 + rev: v0.15.15 hooks: # Run the linter. - id: ruff-check @@ -50,7 +50,7 @@ When using inline YAML lists, quote arguments that contain commas: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.14 + rev: v0.15.15 hooks: # Run the linter. - id: ruff-check @@ -63,7 +63,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.14 + rev: v0.15.15 hooks: # Run the linter. - id: ruff-check @@ -80,7 +80,7 @@ To lint `pyproject.toml`, add `pyproject` to the list of allowed filetypes (requ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.14 + rev: v0.15.15 hooks: # Run the linter. - id: ruff-check diff --git a/pyproject.toml b/pyproject.toml index 98b0c00..e639402 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.15.14", + "ruff==0.15.15", ] From 22f0422809455ec89ffdcf5a00170ba816e42ddb Mon Sep 17 00:00:00 2001 From: astral-versions-bot Date: Thu, 4 Jun 2026 16:34:38 +0000 Subject: [PATCH 4/7] Mirror: 0.15.16 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b50bbae..58f3d68 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # ruff-pre-commit [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![image](https://img.shields.io/pypi/v/ruff/0.15.15.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.15.15.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.15.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.15.16.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.15.16.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.16.svg)](https://pypi.python.org/pypi/ruff) [![Actions status](https://github.com/astral-sh/ruff-pre-commit/workflows/main/badge.svg)](https://github.com/astral-sh/ruff-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff). @@ -20,7 +20,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.15 + rev: v0.15.16 hooks: # Run the linter. - id: ruff-check @@ -34,7 +34,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.15 + rev: v0.15.16 hooks: # Run the linter. - id: ruff-check @@ -50,7 +50,7 @@ When using inline YAML lists, quote arguments that contain commas: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.15 + rev: v0.15.16 hooks: # Run the linter. - id: ruff-check @@ -63,7 +63,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.15 + rev: v0.15.16 hooks: # Run the linter. - id: ruff-check @@ -80,7 +80,7 @@ To lint `pyproject.toml`, add `pyproject` to the list of allowed filetypes (requ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.15 + rev: v0.15.16 hooks: # Run the linter. - id: ruff-check diff --git a/pyproject.toml b/pyproject.toml index e639402..ab30f20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.15.15", + "ruff==0.15.16", ] From f69224b9a09036deb0588511bbec7ee97a8324a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 09:22:45 +0200 Subject: [PATCH 5/7] Bump the github-actions group with 2 updates (#169) Signed-off-by: dependabot[bot] --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f962760..93e1adb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,12 +18,12 @@ jobs: - if: ${{ startsWith(github.event_name, 'repository_dispatch') }} run: sleep 30 - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: true # needed to push commits below - name: Install uv - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 - name: set git config run: | From 99e6029223026d6fa76813c17277c704c11db2a0 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 10 Jun 2026 18:32:44 +0100 Subject: [PATCH 6/7] Various hardenings (#170) --- .github/dependabot.yml | 2 ++ .github/workflows/main.yml | 13 ++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6c5049e..23b2203 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,3 +8,5 @@ updates: github-actions: patterns: - "*" + cooldown: + default-days: 7 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93e1adb..e2685bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,8 +3,6 @@ on: schedule: - cron: "0 */4 * * *" workflow_dispatch: - repository_dispatch: - types: [pypi_release] permissions: {} @@ -15,9 +13,6 @@ jobs: permissions: contents: write steps: - - if: ${{ startsWith(github.event_name, 'repository_dispatch') }} - run: sleep 30 - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: true # needed to push commits below @@ -38,10 +33,10 @@ jobs: UNPUSHED_COMMITS=$(git log origin/main..HEAD) if [ -z "$UNPUSHED_COMMITS" ]; then echo "No unpushed commits found." - echo "changes_exist=false" >> $GITHUB_ENV + echo "changes_exist=false" >> "$GITHUB_ENV" else echo "Unpushed commits found." - echo "changes_exist=true" >> $GITHUB_ENV + echo "changes_exist=true" >> "$GITHUB_ENV" fi - name: push changes if they exist @@ -53,8 +48,8 @@ jobs: - name: create release on new tag if new changes exist if: env.changes_exist == 'true' run: | - TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1)) - echo $TAG_NAME + TAG_NAME=$(git describe --tags "$(git rev-list --tags --max-count=1)") + echo "$TAG_NAME" gh release create "$TAG_NAME" \ --title "$TAG_NAME" \ --notes "See: https://github.com/astral-sh/ruff/releases/tag/${TAG_NAME/v}" \ From 3b3f7c3f57fe9925356faf5fe6230835138be230 Mon Sep 17 00:00:00 2001 From: astral-versions-bot Date: Thu, 11 Jun 2026 17:57:26 +0000 Subject: [PATCH 7/7] Mirror: 0.15.17 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 58f3d68..348e5be 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # ruff-pre-commit [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![image](https://img.shields.io/pypi/v/ruff/0.15.16.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.15.16.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.16.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.15.17.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.15.17.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.15.17.svg)](https://pypi.python.org/pypi/ruff) [![Actions status](https://github.com/astral-sh/ruff-pre-commit/workflows/main/badge.svg)](https://github.com/astral-sh/ruff-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff). @@ -20,7 +20,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.16 + rev: v0.15.17 hooks: # Run the linter. - id: ruff-check @@ -34,7 +34,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.16 + rev: v0.15.17 hooks: # Run the linter. - id: ruff-check @@ -50,7 +50,7 @@ When using inline YAML lists, quote arguments that contain commas: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.16 + rev: v0.15.17 hooks: # Run the linter. - id: ruff-check @@ -63,7 +63,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.16 + rev: v0.15.17 hooks: # Run the linter. - id: ruff-check @@ -80,7 +80,7 @@ To lint `pyproject.toml`, add `pyproject` to the list of allowed filetypes (requ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.15.16 + rev: v0.15.17 hooks: # Run the linter. - id: ruff-check diff --git a/pyproject.toml b/pyproject.toml index ab30f20..f7b1ce6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.15.16", + "ruff==0.15.17", ]