From e2a2094fd1ae3a4fedb7315c5379641ecf13a7fa Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:41:21 +0000 Subject: [PATCH 01/53] Bump README.md version to 0.0.278 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5979d98..b486750 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/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![image](https://img.shields.io/pypi/v/ruff/0.0.277.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.277.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.277.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.278.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.278.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.278.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/charliermarsh/ruff). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.277 + rev: v0.0.278 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.277 + rev: v0.0.278 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.277 + rev: v0.0.278 hooks: - id: ruff types_or: [python, pyi, jupyter] From da18a96f5b4ecf263a4556896723d6cdeb2024d3 Mon Sep 17 00:00:00 2001 From: eggplants Date: Thu, 13 Jul 2023 23:59:29 +0900 Subject: [PATCH 02/53] Fix repo links (#46) ## Summary I replaced `charliermarsh/ruff` with `astral-sh/ruff`. ## Test Plan Check if the changed links are worked. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b486750..b79870f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # ruff-pre-commit -[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) +[![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.0.278.svg)](https://pypi.python.org/pypi/ruff) [![image](https://img.shields.io/pypi/l/ruff/0.0.278.svg)](https://pypi.python.org/pypi/ruff) [![image](https://img.shields.io/pypi/pyversions/ruff/0.0.278.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/charliermarsh/ruff). +A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff). Distributed as a standalone repository to enable installing Ruff via prebuilt wheels from [PyPI](https://pypi.org/project/ruff/). @@ -56,6 +56,6 @@ MIT
- +
From b09212dc3673fc734c7279728683e89002d4a2b4 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 20:46:16 +0000 Subject: [PATCH 03/53] Mirror: 0.0.279 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 5447725..3a42c22 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.278 +0.0.279 diff --git a/setup.py b/setup.py index aedcfaf..549234f 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.278'], + install_requires=['ruff==0.0.279'], ) From c16fde55ad87bc486b591d35ee28870a478133c8 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 20:46:17 +0000 Subject: [PATCH 04/53] Bump README.md version to 0.0.279 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b79870f..0253a4d 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.0.278.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.278.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.278.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.279.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.279.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.279.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.278 + rev: v0.0.279 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.278 + rev: v0.0.279 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.278 + rev: v0.0.279 hooks: - id: ruff types_or: [python, pyi, jupyter] From 1c8d30bd0337717ec98f508ff8fcd12de81d3586 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Jul 2023 03:51:24 +0000 Subject: [PATCH 05/53] Mirror: 0.0.280 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 3a42c22..8146964 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.279 +0.0.280 diff --git a/setup.py b/setup.py index 549234f..3fe92e9 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.279'], + install_requires=['ruff==0.0.280'], ) From 5997ecd133c20c853dcd82946a0f5467edfad463 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Jul 2023 03:51:25 +0000 Subject: [PATCH 06/53] Bump README.md version to 0.0.280 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0253a4d..1f96dab 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.0.279.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.279.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.279.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.280.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.280.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.280.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.279 + rev: v0.0.280 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.279 + rev: v0.0.280 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.279 + rev: v0.0.280 hooks: - id: ruff types_or: [python, pyi, jupyter] From 2b844a9c8b9defadd0a0fab39dace0b524999daa Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:21:54 +0000 Subject: [PATCH 07/53] Mirror: 0.0.281 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 8146964..5171753 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.280 +0.0.281 diff --git a/setup.py b/setup.py index 3fe92e9..11b1e3d 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.280'], + install_requires=['ruff==0.0.281'], ) From 2cdabd98736d013a9ddb771bf9057ec29936099d Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:21:55 +0000 Subject: [PATCH 08/53] Bump README.md version to 0.0.281 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1f96dab..ca14fa0 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.0.280.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.280.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.280.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.281.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.281.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.281.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.280 + rev: v0.0.281 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.280 + rev: v0.0.281 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.280 + rev: v0.0.281 hooks: - id: ruff types_or: [python, pyi, jupyter] From ade96e24aa3fa43c9d9b50d6cccae93d82765f40 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:58:08 +0000 Subject: [PATCH 09/53] Mirror: 0.0.282 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 5171753..2a28e41 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.281 +0.0.282 diff --git a/setup.py b/setup.py index 11b1e3d..c53e863 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.281'], + install_requires=['ruff==0.0.282'], ) From 6c0ceaccffa1ebb1db1ea1a6d7289b50d29bfce2 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:58:09 +0000 Subject: [PATCH 10/53] Bump README.md version to 0.0.282 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ca14fa0..5ba1218 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.0.281.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.281.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.281.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.282.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.282.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.282.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.281 + rev: v0.0.282 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.281 + rev: v0.0.282 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.281 + rev: v0.0.282 hooks: - id: ruff types_or: [python, pyi, jupyter] From 24ae3f3414d0e93f8e3229e3f910bbe914e0712e Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 19:01:29 +0000 Subject: [PATCH 11/53] Mirror: 0.0.283 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 2a28e41..14e617b 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.282 +0.0.283 diff --git a/setup.py b/setup.py index c53e863..fa4b3f0 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.282'], + install_requires=['ruff==0.0.283'], ) From a5b0cb474117b2642a8b3cf5a40d835885170bc2 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 19:01:30 +0000 Subject: [PATCH 12/53] Bump README.md version to 0.0.283 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5ba1218..773bd7d 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.0.282.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.282.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.282.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.283.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.283.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.283.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.282 + rev: v0.0.283 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.282 + rev: v0.0.283 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.282 + rev: v0.0.283 hooks: - id: ruff types_or: [python, pyi, jupyter] From b9a5dc23ed421f99c0fe14b9ace2cbc7fbf710bd Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 19:04:50 +0000 Subject: [PATCH 13/53] Mirror: 0.0.284 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 14e617b..72a1b32 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.283 +0.0.284 diff --git a/setup.py b/setup.py index fa4b3f0..50dbf61 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.283'], + install_requires=['ruff==0.0.284'], ) From 9808e002ad5890d14140d99dfc5303e1de7fc74d Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 19:04:51 +0000 Subject: [PATCH 14/53] Bump README.md version to 0.0.284 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 773bd7d..d949651 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.0.283.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.283.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.283.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.284.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.284.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.284.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.283 + rev: v0.0.284 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.283 + rev: v0.0.284 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.283 + rev: v0.0.284 hooks: - id: ruff types_or: [python, pyi, jupyter] From b9787ef94f0d06972b93b36730548f0d928f26f9 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 21:18:17 +0000 Subject: [PATCH 15/53] Mirror: 0.0.285 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index 72a1b32..b0df6e7 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.284 +0.0.285 diff --git a/setup.py b/setup.py index 50dbf61..55508e2 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.284'], + install_requires=['ruff==0.0.285'], ) From 21ca293cbcc55df9b2f59446eaf55437337dd93c Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 21:18:18 +0000 Subject: [PATCH 16/53] Bump README.md version to 0.0.285 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d949651..39994ea 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.0.284.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.284.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.284.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.285.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.285.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.285.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.284 + rev: v0.0.285 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.284 + rev: v0.0.285 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.284 + rev: v0.0.285 hooks: - id: ruff types_or: [python, pyi, jupyter] From cf997e203947de4c75f8b56165bf356c25eead44 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:43:22 +0000 Subject: [PATCH 17/53] Mirror: 0.0.286 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index b0df6e7..e4d9ef7 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.285 +0.0.286 diff --git a/setup.py b/setup.py index 55508e2..1b1bbf3 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.285'], + install_requires=['ruff==0.0.286'], ) From 294ccdf82ae2398d845cae0547345b27beca0d8b Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 19:43:23 +0000 Subject: [PATCH 18/53] Bump README.md version to 0.0.286 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 39994ea..5691eaf 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.0.285.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.285.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.285.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.286.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.286.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.286.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.285 + rev: v0.0.286 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.285 + rev: v0.0.286 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.285 + rev: v0.0.286 hooks: - id: ruff types_or: [python, pyi, jupyter] From 47023bed2b253176c10ba0f760c85e952e52e5fd Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:09:37 +0000 Subject: [PATCH 19/53] Mirror: 0.0.287 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index e4d9ef7..fd9cb0a 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.286 +0.0.287 diff --git a/setup.py b/setup.py index 1b1bbf3..6030efa 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.286'], + install_requires=['ruff==0.0.287'], ) From 3a6d4075bf0d3c0fd268c87bbefd1196bab4ca1d Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:09:38 +0000 Subject: [PATCH 20/53] Bump README.md version to 0.0.287 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5691eaf..ac8b06b 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.0.286.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.286.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.286.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.287.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.287.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.287.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff types_or: [python, pyi, jupyter] From 36d09b6e15ad1577720205c2591714ab7636cac7 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 17:08:31 +0000 Subject: [PATCH 21/53] Mirror: 0.0.288 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index fd9cb0a..a81317b 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.287 +0.0.288 diff --git a/setup.py b/setup.py index 6030efa..9c3ecc2 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.287'], + install_requires=['ruff==0.0.288'], ) From 2f86fcef83ae94c468c9b5528b75973c70092e4a Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 17:08:33 +0000 Subject: [PATCH 22/53] Bump README.md version to 0.0.288 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ac8b06b..9d67e3a 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.0.287.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.287.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.287.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.288.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.288.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.288.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.287 + rev: v0.0.288 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.287 + rev: v0.0.288 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.287 + rev: v0.0.288 hooks: - id: ruff types_or: [python, pyi, jupyter] From 36c161038ec6d1447949edd5c0060436cb483c9b Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:43:36 +0000 Subject: [PATCH 23/53] Mirror: 0.0.289 --- .version | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.version b/.version index a81317b..3755225 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.288 +0.0.289 diff --git a/setup.py b/setup.py index 9c3ecc2..103b389 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.288'], + install_requires=['ruff==0.0.289'], ) From 9845d8439413d00d1f6b364abe26702444c6577b Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:43:37 +0000 Subject: [PATCH 24/53] Bump README.md version to 0.0.289 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9d67e3a..87cbf90 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.0.288.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.288.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.288.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.289.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.289.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.289.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.288 + rev: v0.0.289 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.288 + rev: v0.0.289 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.288 + rev: v0.0.289 hooks: - id: ruff types_or: [python, pyi, jupyter] From caa92debffba9279eaef7e13386ce1492ce565bf Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 12 Sep 2023 15:49:39 -0500 Subject: [PATCH 25/53] Add alpha formatter support (#50) --- .pre-commit-hooks.yaml | 30 ++++++++++++++++++++---------- README.md | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 8e18d85..3dce9c5 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,10 +1,20 @@ -- id: ruff - name: ruff - description: "Run 'ruff' for extremely fast Python linting" - entry: ruff check --force-exclude - language: python - 'types_or': [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: '2.9.2' +- id: ruff + name: ruff + description: "Run 'ruff' for extremely fast Python linting" + entry: ruff check --force-exclude + language: python + "types_or": [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" +- id: ruff-format + name: ruff-format + description: "Run 'ruff format' for extremely fast Python formatting" + entry: ruff format --force-exclude + language: python + "types_or": [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" diff --git a/README.md b/README.md index 87cbf90..78d063f 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,28 @@ _unless_ you enable autofix, in which case, Ruff's pre-commit hook should run _b and other formatting tools, as Ruff's autofix behavior can output code changes that require reformatting. +### Using Ruff's formatter (unstable) + +[Ruff's formatter](https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_formatter/README.md) is in Alpha, but can used with pre-commit by adding the `ruff-format` hook: + +```yaml +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.289 + hooks: + - id: ruff-format +``` + +To check formatting without changing files, use `--check`: + +```yaml +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.0.289 + hooks: + - id: ruff-format + args: [--check] +``` + ## License MIT From 25507cf2f950a54ab0b465cf87462e3b2e62d3c5 Mon Sep 17 00:00:00 2001 From: Zanie Date: Tue, 12 Sep 2023 15:50:37 -0500 Subject: [PATCH 26/53] Drop the revision from the formatter examples --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 78d063f..e262382 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.289 hooks: - id: ruff-format ``` @@ -65,8 +64,6 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.0.289 hooks: - id: ruff-format args: [--check] From 5accf968112983d06ff5df0d46f8ca65dff3774c Mon Sep 17 00:00:00 2001 From: Zanie Date: Tue, 12 Sep 2023 15:54:47 -0500 Subject: [PATCH 27/53] Require `main` revision until next release of pre-commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e262382..bf9bbf0 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit + rev: main hooks: - id: ruff-format ``` @@ -64,6 +65,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit + rev: main hooks: - id: ruff-format args: [--check] From 277125742a9e88f75dbbf2a4f4b130e2d8ddb28b Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 15 Sep 2023 14:37:18 -0500 Subject: [PATCH 28/53] Bump version to 0.0.290; update required formatter revision (#51) --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf9bbf0..984d427 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -56,7 +56,8 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: main + # Ruff version. + rev: v0.0.290 hooks: - id: ruff-format ``` @@ -65,12 +66,15 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: main + # Ruff version. + rev: v0.0.290 hooks: - id: ruff-format args: [--check] ``` +Note `v0.0.290` is the minimum version that provides the `ruff-format` hook. + ## License MIT From 0b90c17c1a9e4cb48532e2711df457064fc657e3 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 20:06:07 +0000 Subject: [PATCH 29/53] Bump README.md version to 0.0.289 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 984d427..7d3f963 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.289 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.289 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.289 hooks: - id: ruff-format args: [--check] From 55147f81dc631fbb8d3d19be5a8caceff34d7ae7 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 21:21:00 +0000 Subject: [PATCH 30/53] Mirror: 0.0.290 --- .pre-commit-hooks.yaml | 30 ++++++++++-------------------- .version | 2 +- setup.py | 2 +- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3dce9c5..8e18d85 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,20 +1,10 @@ -- id: ruff - name: ruff - description: "Run 'ruff' for extremely fast Python linting" - entry: ruff check --force-exclude - language: python - "types_or": [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: "2.9.2" -- id: ruff-format - name: ruff-format - description: "Run 'ruff format' for extremely fast Python formatting" - entry: ruff format --force-exclude - language: python - "types_or": [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: "2.9.2" +- id: ruff + name: ruff + description: "Run 'ruff' for extremely fast Python linting" + entry: ruff check --force-exclude + language: python + 'types_or': [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: '2.9.2' diff --git a/.version b/.version index 3755225..ef63c3f 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.289 +0.0.290 diff --git a/setup.py b/setup.py index 103b389..1905625 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.289'], + install_requires=['ruff==0.0.290'], ) From 1b38aa0ddb1b21ea3ae20457208baf136e59234b Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 21:21:01 +0000 Subject: [PATCH 31/53] Bump README.md version to 0.0.290 --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7d3f963..19159ae 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.0.289.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.289.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.289.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.290.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.290.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.290.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.289 + rev: v0.0.290 hooks: - id: ruff-format args: [--check] From 6fcbf19c7cf351a8dc3517a0fed3ebfa05610de2 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 15 Sep 2023 17:08:19 -0500 Subject: [PATCH 32/53] Restore `ruff-format` hook (#52) Deleted by automation in https://github.com/astral-sh/ruff-pre-commit/commit/55147f81dc631fbb8d3d19be5a8caceff34d7ae7 --- .pre-commit-hooks.yaml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 8e18d85..3dce9c5 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,10 +1,20 @@ -- id: ruff - name: ruff - description: "Run 'ruff' for extremely fast Python linting" - entry: ruff check --force-exclude - language: python - 'types_or': [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: '2.9.2' +- id: ruff + name: ruff + description: "Run 'ruff' for extremely fast Python linting" + entry: ruff check --force-exclude + language: python + "types_or": [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" +- id: ruff-format + name: ruff-format + description: "Run 'ruff format' for extremely fast Python formatting" + entry: ruff format --force-exclude + language: python + "types_or": [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" From e6d90feffcd3f0187e565bbd15fd07fe083b28ed Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:58:26 +0000 Subject: [PATCH 33/53] Mirror: 0.0.291 --- .pre-commit-hooks.yaml | 30 ++++++++++-------------------- .version | 2 +- setup.py | 2 +- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3dce9c5..8e18d85 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,20 +1,10 @@ -- id: ruff - name: ruff - description: "Run 'ruff' for extremely fast Python linting" - entry: ruff check --force-exclude - language: python - "types_or": [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: "2.9.2" -- id: ruff-format - name: ruff-format - description: "Run 'ruff format' for extremely fast Python formatting" - entry: ruff format --force-exclude - language: python - "types_or": [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: "2.9.2" +- id: ruff + name: ruff + description: "Run 'ruff' for extremely fast Python linting" + entry: ruff check --force-exclude + language: python + 'types_or': [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: '2.9.2' diff --git a/.version b/.version index ef63c3f..fa175fd 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.290 +0.0.291 diff --git a/setup.py b/setup.py index 1905625..0ff87ce 100644 --- a/setup.py +++ b/setup.py @@ -6,5 +6,5 @@ setup( name='pre_commit_placeholder_package', version='0.0.0', - install_requires=['ruff==0.0.290'], + install_requires=['ruff==0.0.291'], ) From e5fa9aeaf1c334742b9e7aae4c0c8cefcce71de6 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:58:28 +0000 Subject: [PATCH 34/53] Bump README.md version to 0.0.291 --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 19159ae..f4871d6 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.0.290.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.290.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.290.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.291.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.291.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.291.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.291 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.291 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.291 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.291 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.290 + rev: v0.0.291 hooks: - id: ruff-format args: [--check] From 146c621c9fbe4727ca57be94779b7abecf5058ec Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 15 Sep 2023 17:08:19 -0500 Subject: [PATCH 35/53] Restore `ruff-format` hook (#52) Deleted by automation in https://github.com/astral-sh/ruff-pre-commit/commit/55147f81dc631fbb8d3d19be5a8caceff34d7ae7 --- .pre-commit-hooks.yaml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 8e18d85..3dce9c5 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,10 +1,20 @@ -- id: ruff - name: ruff - description: "Run 'ruff' for extremely fast Python linting" - entry: ruff check --force-exclude - language: python - 'types_or': [python, pyi] - args: [] - require_serial: true - additional_dependencies: [] - minimum_pre_commit_version: '2.9.2' +- id: ruff + name: ruff + description: "Run 'ruff' for extremely fast Python linting" + entry: ruff check --force-exclude + language: python + "types_or": [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" +- id: ruff-format + name: ruff-format + description: "Run 'ruff format' for extremely fast Python formatting" + entry: ruff format --force-exclude + language: python + "types_or": [python, pyi] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" From ba4269e9c6827628d9ff4732249ba22fbde46ae7 Mon Sep 17 00:00:00 2001 From: Subin Kim <32478597+sudosubin@users.noreply.github.com> Date: Wed, 27 Sep 2023 00:38:22 +0900 Subject: [PATCH 36/53] feat: Update pre-commit mirror script (#53) ## Summary - `pre-commit-mirror-maker` is not suitable for generating multiple hooks in single `.pre-commit-hooks.yaml` file. - So replaced the script and github workflows. ## Test Plan - Update `pyproject.toml`'s `ruff==0.0.290` into `ruff==0.0.289`, and run the script. ```sh $ python3 mirror.py ... ``` --- .github/workflows/main.yml | 21 +++++------ .pre-commit-hooks.yaml | 5 ++- .version | 1 - mirror.py | 75 ++++++++++++++++++++++++++++++++++++++ pyproject.toml | 13 +++++++ requirements-dev.txt | 49 +++++++++++++++++++++++++ setup.py | 10 ----- update_version.py | 26 ------------- 8 files changed, 150 insertions(+), 50 deletions(-) delete mode 100644 .version create mode 100644 mirror.py create mode 100644 pyproject.toml create mode 100644 requirements-dev.txt delete mode 100644 setup.py delete mode 100644 update_version.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b44ede..c1918fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: - cron: "0 */4 * * *" workflow_dispatch: repository_dispatch: - types: [ pypi_release ] + types: [pypi_release] jobs: build: @@ -14,24 +14,23 @@ jobs: - if: ${{ startsWith(github.event_name, 'repository_dispatch') }} run: sleep 30 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: "3.x" + python-version: "3.11" + cache: pip + cache-dependency-path: requirements-dev.txt - - run: pip install pre-commit-mirror-maker + - run: pip install -r requirements-dev.txt - name: set git config run: | git config user.name 'Github Actions' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' - - run: pre-commit-mirror --language python --package-name ruff --entry 'ruff check --force-exclude' --id ruff --types-or python --types-or pyi --require-serial --description "Run 'ruff' for extremely fast Python linting" . + - run: python mirror.py - - run: git push origin HEAD:refs/heads/main --tags - - - name: "Update version in README.md" - run: python update_version.py - - - run: git push origin HEAD:refs/heads/main + - run: | + git push origin HEAD:refs/heads/main + git push origin HEAD:refs/heads/main --tags diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3dce9c5..2c1ddf8 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -3,17 +3,18 @@ description: "Run 'ruff' for extremely fast Python linting" entry: ruff check --force-exclude language: python - "types_or": [python, pyi] + types_or: [python, pyi] args: [] require_serial: true additional_dependencies: [] minimum_pre_commit_version: "2.9.2" + - id: ruff-format name: ruff-format description: "Run 'ruff format' for extremely fast Python formatting" entry: ruff format --force-exclude language: python - "types_or": [python, pyi] + types_or: [python, pyi] args: [] require_serial: true additional_dependencies: [] diff --git a/.version b/.version deleted file mode 100644 index fa175fd..0000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -0.0.291 diff --git a/mirror.py b/mirror.py new file mode 100644 index 0000000..48ae1c0 --- /dev/null +++ b/mirror.py @@ -0,0 +1,75 @@ +import re +import subprocess +import typing +from pathlib import Path + +import tomllib +import urllib3 +from packaging.requirements import Requirement +from packaging.version import Version + + +def main(): + with open(Path(__file__).parent / "pyproject.toml", "rb") as f: + pyproject = tomllib.load(f) + + all_versions = get_all_versions() + current_version = get_current_version(pyproject=pyproject) + target_versions = [v for v in all_versions if v > current_version] + + for version in target_versions: + paths = process_version(version) + if subprocess.check_output(["git", "status", "-s"]).strip(): + subprocess.run(["git", "add", *paths]) + subprocess.run(["git", "commit", "-m", f"Mirror: {version}"]) + subprocess.run(["git", "tag", f"v{version}"]) + else: + print(f"No change v{version}") + + +def get_all_versions() -> typing.List[Version]: + response = urllib3.request("GET", "https://pypi.org/pypi/ruff/json") + if response.status != 200: + raise RuntimeError("Failed to fetch versions from pypi") + + versions = [Version(release) for release in response.json()["releases"]] + return sorted(versions) + + +def get_current_version(pyproject: dict) -> Version: + requirements = [Requirement(d) for d in pyproject["project"]["dependencies"]] + requirement = next((r for r in requirements if r.name == "ruff"), None) + assert requirement is not None, "pyproject.toml does not have ruff requirement" + + specifiers = list(requirement.specifier) + assert ( + len(specifiers) == 1 and specifiers[0].operator == "==" + ), f"ruff's specifier should be exact matching, but `{requirement}`" + + return Version(specifiers[0].version) + + +def process_version(version: Version) -> typing.Sequence[str]: + def replace_pyproject_toml(content: str) -> str: + return re.sub(r'"ruff==.*"', f'"ruff=={version}"', content) + + def replace_readme_md(content: str) -> str: + content = re.sub(r"rev: v\d+\.\d+\.\d+", f"rev: v{version}", content) + return re.sub(r"/ruff/\d+\.\d+\.\d+\.svg", f"/ruff/{version}.svg", content) + + paths = { + "pyproject.toml": replace_pyproject_toml, + "README.md": replace_readme_md, + } + + for path, replacer in paths.items(): + with open(path) as f: + content = replacer(f.read()) + with open(path, mode="w") as f: + f.write(content) + + return tuple(paths.keys()) + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9499a00 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "ruff-pre-commit" +version = "0.0.0" +dependencies = [ + "ruff==0.0.291", +] + +[project.optional-dependencies] +dev = [ + "packaging~=23.1", + "pip-tools>=7.3.0,<8.0.0", + "urllib3>=2.0.5,<3.0.0", +] diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..ec9cbe4 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,49 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --extra=dev --generate-hashes --output-file=./requirements-dev.txt --unsafe-package=ruff ./pyproject.toml +# +build==1.0.3 \ + --hash=sha256:538aab1b64f9828977f84bc63ae570b060a8ed1be419e7870b8b4fc5e6ea553b \ + --hash=sha256:589bf99a67df7c9cf07ec0ac0e5e2ea5d4b37ac63301c4986d1acb126aa83f8f + # via pip-tools +click==8.1.7 \ + --hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \ + --hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de + # via pip-tools +packaging==23.1 \ + --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ + --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f + # via + # build + # ruff-pre-commit (./pyproject.toml) +pip==23.2.1 \ + --hash=sha256:7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be \ + --hash=sha256:fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2 + # via pip-tools +pip-tools==7.3.0 \ + --hash=sha256:8717693288720a8c6ebd07149c93ab0be1fced0b5191df9e9decd3263e20d85e \ + --hash=sha256:8e9c99127fe024c025b46a0b2d15c7bd47f18f33226cf7330d35493663fc1d1d + # via ruff-pre-commit (./pyproject.toml) +pyproject-hooks==1.0.0 \ + --hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \ + --hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5 + # via build +setuptools==68.2.2 \ + --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ + --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a + # via pip-tools +urllib3==2.0.5 \ + --hash=sha256:13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594 \ + --hash=sha256:ef16afa8ba34a1f989db38e1dbbe0c302e4289a47856990d0682e374563ce35e + # via ruff-pre-commit (./pyproject.toml) +wheel==0.41.2 \ + --hash=sha256:0c5ac5ff2afb79ac23ab82bab027a0be7b5dbcf2e54dc50efe4bf507de1f7985 \ + --hash=sha256:75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8 + # via pip-tools + +# WARNING: The following packages were not pinned, but pip requires them to be +# pinned when the requirements file includes hashes and the requirement is not +# satisfied by a package already installed. Consider using the --allow-unsafe flag. +# ruff diff --git a/setup.py b/setup.py deleted file mode 100644 index 0ff87ce..0000000 --- a/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -from __future__ import annotations - -from setuptools import setup - - -setup( - name='pre_commit_placeholder_package', - version='0.0.0', - install_requires=['ruff==0.0.291'], -) diff --git a/update_version.py b/update_version.py deleted file mode 100644 index b98868f..0000000 --- a/update_version.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Updates the version in the readme and git commit.""" - -import re -from pathlib import Path -from subprocess import check_call, check_output - - -def main(): - readme_md = Path("README.md") - readme = readme_md.read_text() - rev = Path(".version").read_text().strip() - readme = re.sub(r"rev: v\d+\.\d+\.\d+", f"rev: v{rev}", readme) - readme = re.sub(r"/ruff/\d+\.\d+\.\d+\.svg", f"/ruff/{rev}.svg", readme) - readme_md.write_text(readme) - - # Only commit on change. - # https://stackoverflow.com/a/9393642/3549270 - if check_output(["git", "status", "-s"]).strip(): - check_call(["git", "add", readme_md]) - check_call(["git", "commit", "-m", f"Bump README.md version to {rev}"]) - else: - print("No change") - - -if __name__ == "__main__": - main() From 42f98979dbdfcd148dff424477552b8816a7cf01 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 17:15:54 +0000 Subject: [PATCH 37/53] Mirror: 0.0.292 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f4871d6..60dc222 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.0.291.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.291.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.291.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.0.292.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.0.292.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.292.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.291 + rev: v0.0.292 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.291 + rev: v0.0.292 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.291 + rev: v0.0.292 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.291 + rev: v0.0.292 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.291 + rev: v0.0.292 hooks: - id: ruff-format args: [--check] diff --git a/pyproject.toml b/pyproject.toml index 9499a00..1ac8d59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.0.291", + "ruff==0.0.292", ] [project.optional-dependencies] From 382100c524aa3fa39218d6262f0cbf02dffae4db Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:41:47 +0000 Subject: [PATCH 38/53] Mirror: 0.1.0 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 60dc222..d697a53 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.0.292.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.0.292.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.0.292.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.0.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.0.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.0.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.292 + rev: v0.1.0 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.292 + rev: v0.1.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.292 + rev: v0.1.0 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.292 + rev: v0.1.0 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.292 + rev: v0.1.0 hooks: - id: ruff-format args: [--check] diff --git a/pyproject.toml b/pyproject.toml index 1ac8d59..01e041c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.0.292", + "ruff==0.1.0", ] [project.optional-dependencies] From 51ae37a7805e6d6f791a373b7d7752d023ea6c0f Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 21:22:21 +0000 Subject: [PATCH 39/53] Mirror: 0.1.1 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d697a53..7e7018d 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.1.0.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.0.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.0.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.1.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.1.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.1.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.0 + rev: v0.1.1 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.0 + rev: v0.1.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.0 + rev: v0.1.1 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.0 + rev: v0.1.1 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.0 + rev: v0.1.1 hooks: - id: ruff-format args: [--check] diff --git a/pyproject.toml b/pyproject.toml index 01e041c..739e12d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.0", + "ruff==0.1.1", ] [project.optional-dependencies] From 00ca9a349a1f18c907d839441c8687b66a9247b3 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:54:57 +0000 Subject: [PATCH 40/53] Mirror: 0.1.2 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7e7018d..e3d5c4c 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.1.1.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.1.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.1.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.2.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.2.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.2.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.1 + rev: v0.1.2 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.1 + rev: v0.1.2 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.1 + rev: v0.1.2 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.1 + rev: v0.1.2 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.1 + rev: v0.1.2 hooks: - id: ruff-format args: [--check] diff --git a/pyproject.toml b/pyproject.toml index 739e12d..30c4de2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.1", + "ruff==0.1.2", ] [project.optional-dependencies] From 8a43105c597ef7067b5507451f4f1b07e5f6e26d Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 19:27:28 +0000 Subject: [PATCH 41/53] Mirror: 0.1.3 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e3d5c4c..36bda5a 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.1.2.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.2.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.2.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.3.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.3.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.3.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.2 + rev: v0.1.3 hooks: - id: ruff-format args: [--check] diff --git a/pyproject.toml b/pyproject.toml index 30c4de2..89e26e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.2", + "ruff==0.1.3", ] [project.optional-dependencies] From 76536a3fe16cb1e6e4dddddd07498e96ad531924 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 27 Oct 2023 15:28:12 -0400 Subject: [PATCH 42/53] docs: remove alpha designation on ruff-format (#56) I think this was old? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36bda5a..09a89dc 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ reformatting. ### Using Ruff's formatter (unstable) -[Ruff's formatter](https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_formatter/README.md) is in Alpha, but can used with pre-commit by adding the `ruff-format` hook: +[Ruff's formatter](https://docs.astral.sh/ruff/formatter) can used with pre-commit by adding the `ruff-format` hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit From 3dacd83b1ee8fb950dbdd1001f9b5851728b6077 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:31:21 +0000 Subject: [PATCH 43/53] Mirror: 0.1.4 --- README.md | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 09a89dc..b892b25 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.1.3.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.3.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.3.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.4.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.4.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.4.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). @@ -18,7 +18,7 @@ Add this to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.3 + rev: v0.1.4 hooks: - id: ruff ``` @@ -28,7 +28,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.3 + rev: v0.1.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -39,7 +39,7 @@ To run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.3 + rev: v0.1.4 hooks: - id: ruff types_or: [python, pyi, jupyter] @@ -57,7 +57,7 @@ reformatting. ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.3 + rev: v0.1.4 hooks: - id: ruff-format ``` @@ -67,7 +67,7 @@ To check formatting without changing files, use `--check`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.3 + rev: v0.1.4 hooks: - id: ruff-format args: [--check] diff --git a/pyproject.toml b/pyproject.toml index 89e26e1..c3407a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.3", + "ruff==0.1.4", ] [project.optional-dependencies] From f1ef5ac6b5a6eadcd37ac6fbaf7803460fb1ca33 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 7 Nov 2023 10:33:28 -0800 Subject: [PATCH 44/53] Update pre-commit documentation (#57) I got some feedback on Mastodon that it wasn't clear how to use the linter and formatter together in pre-commit. This also removes `--exit-non-zero-on-fix`, since pre-commit already exits if files are changed, and changes our recommendation to always put the formatter after the linter, since if a previous tool ends up committing changes, pre-commit should fail anyway. --- README.md | 54 +++++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index b892b25..2d390ff 100644 --- a/README.md +++ b/README.md @@ -13,67 +13,59 @@ Distributed as a standalone repository to enable installing Ruff via prebuilt wh ### Using Ruff with pre-commit -Add this to your `.pre-commit-config.yaml`: +To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https://docs.astral.sh/ruff/formatter) +(available as of Ruff v0.0.289) via pre-commit, add the following to your `.pre-commit-config.yaml`: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.1.4 hooks: + # Run the linter. - id: ruff + # Run the formatter. + - id: ruff-format ``` -Or, to enable autofix: +To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.1.4 hooks: + # Run the linter. - id: ruff - args: [--fix, --exit-non-zero-on-fix] + args: [ --fix ] + # Run the formatter. + - id: ruff-format ``` -To run the hook on Jupyter Notebooks too: +To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowed filetypes: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.1.4 hooks: + # Run the linter. - id: ruff - types_or: [python, pyi, jupyter] -``` - -Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort, -_unless_ you enable autofix, in which case, Ruff's pre-commit hook should run _before_ Black, isort, -and other formatting tools, as Ruff's autofix behavior can output code changes that require -reformatting. - -### Using Ruff's formatter (unstable) - -[Ruff's formatter](https://docs.astral.sh/ruff/formatter) can used with pre-commit by adding the `ruff-format` hook: - -```yaml -- repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.1.4 - hooks: + types_or: [ python, pyi, jupyter ] + args: [ --fix ] + # Run the formatter. - id: ruff-format + types_or: [ python, pyi, jupyter ] ``` -To check formatting without changing files, use `--check`: +When running with `--fix`, Ruff's lint hook should be placed _before_ Ruff's formatter hook, and +_before_ Black, isort, and other formatting tools, as Ruff's fix behavior can output code changes +that require reformatting. -```yaml -- repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.1.4 - hooks: - - id: ruff-format - args: [--check] -``` +When running without `--fix`, Ruff's formatter hook can be placed before or after Ruff's lint hook. -Note `v0.0.290` is the minimum version that provides the `ruff-format` hook. +(As long as your Ruff configuration avoids any [linter-formatter incompatibilities](https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules), +`ruff format` should never introduce new lint errors, so it's safe to run Ruff's format hook _after_ +`ruff check --fix`.) ## License From 3d440bd6c67653f33f1c89ff9d6d450685ef9bfc Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 23:12:19 +0000 Subject: [PATCH 45/53] Mirror: 0.1.5 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2d390ff..ad7253e 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.1.4.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.4.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.4.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.5.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.5.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.5.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.4 + rev: v0.1.5 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.4 + rev: v0.1.5 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.4 + rev: v0.1.5 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index c3407a7..efcd1d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.4", + "ruff==0.1.5", ] [project.optional-dependencies] From 75d1925b523dd109cc200d1b29142ff36ec785ad Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:47:15 +0000 Subject: [PATCH 46/53] Mirror: 0.1.6 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ad7253e..aa5de29 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.1.5.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.5.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.5.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.6.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.6.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.6.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.5 + rev: v0.1.6 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.5 + rev: v0.1.6 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.5 + rev: v0.1.6 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index efcd1d3..3d245fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.5", + "ruff==0.1.6", ] [project.optional-dependencies] From a6ff26895e5ae243a36999ba87eb6b4af3c202b3 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:55:57 +0000 Subject: [PATCH 47/53] Mirror: 0.1.7 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aa5de29..d9bf0d9 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.1.6.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.6.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.6.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.7.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.7.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.7.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.6 + rev: v0.1.7 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.6 + rev: v0.1.7 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.6 + rev: v0.1.7 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 3d245fc..5aa0d56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.6", + "ruff==0.1.7", ] [project.optional-dependencies] From d7c4946c7c152163ce34efe35be4e1015d053edd Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:11:31 +0000 Subject: [PATCH 48/53] Mirror: 0.1.8 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d9bf0d9..9acf087 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.1.7.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.7.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.7.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.8.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.8.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.8.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.7 + rev: v0.1.8 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.7 + rev: v0.1.8 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.7 + rev: v0.1.8 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 5aa0d56..8ca138f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.7", + "ruff==0.1.8", ] [project.optional-dependencies] From 7bcc70ca475b87e0fdee2511300c74b25babe0b3 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 18:43:43 +0000 Subject: [PATCH 49/53] Mirror: 0.1.9 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9acf087..2f36d52 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.1.8.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.8.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.8.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.9.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.9.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.9.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.8 + rev: v0.1.9 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.8 + rev: v0.1.9 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.8 + rev: v0.1.9 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 8ca138f..4667143 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.8", + "ruff==0.1.9", ] [project.optional-dependencies] From 10d650cb4b1bcf99c3209a62207cafe6836509cb Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:23:47 +0000 Subject: [PATCH 50/53] Mirror: 0.1.10 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2f36d52..a5e062f 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.1.9.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.9.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.9.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.10.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.10.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.10.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.9 + rev: v0.1.10 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.9 + rev: v0.1.10 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.9 + rev: v0.1.10 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 4667143..73bf8fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.9", + "ruff==0.1.10", ] [project.optional-dependencies] From fbe77be689d01fea5a7b64d3c495d4d1ed646852 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 23:00:06 +0000 Subject: [PATCH 51/53] Mirror: 0.1.11 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a5e062f..41aee4f 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.1.10.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.10.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.10.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.11.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.11.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.11.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.10 + rev: v0.1.11 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.10 + rev: v0.1.11 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.10 + rev: v0.1.11 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 73bf8fa..1eb0396 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.10", + "ruff==0.1.11", ] [project.optional-dependencies] From 0511de30af7a3bb94773d285f6891ea8bf41771f Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:51:26 +0000 Subject: [PATCH 52/53] Mirror: 0.1.12 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 41aee4f..8ac9189 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.1.11.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.11.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.11.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.12.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.12.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.12.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.11 + rev: v0.1.12 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.11 + rev: v0.1.12 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.11 + rev: v0.1.12 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 1eb0396..bf58d90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.11", + "ruff==0.1.12", ] [project.optional-dependencies] From abe8946973726245279f972c708ebcd6ae0ec272 Mon Sep 17 00:00:00 2001 From: Github Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 15:59:09 +0000 Subject: [PATCH 53/53] Mirror: 0.1.13 --- README.md | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8ac9189..0a2ba93 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.1.12.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.1.12.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.12.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.1.13.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.1.13.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.1.13.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). @@ -19,7 +19,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.12 + rev: v0.1.13 hooks: # Run the linter. - id: ruff @@ -32,7 +32,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.12 + rev: v0.1.13 hooks: # Run the linter. - id: ruff @@ -46,7 +46,7 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.12 + rev: v0.1.13 hooks: # Run the linter. - id: ruff diff --git a/pyproject.toml b/pyproject.toml index bf58d90..4989109 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.1.12", + "ruff==0.1.13", ] [project.optional-dependencies]