diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cfc9a44..5925bd8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,21 +16,15 @@ jobs: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: download uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh - - - run: uv pip install --system -r requirements-dev.txt + - name: Install uv + uses: astral-sh/setup-uv@v5 - name: set git config run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - run: python mirror.py + - run: uv run --no-project mirror.py - name: check for unpushed commits id: check_unpushed diff --git a/README.md b/README.md index d82bddf..1255b38 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.8.1.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.8.1.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.8.1.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.9.4.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.9.4.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.9.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). @@ -20,7 +20,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.1 + rev: v0.9.4 hooks: # Run the linter. - id: ruff @@ -34,7 +34,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.1 + rev: v0.9.4 hooks: # Run the linter. - id: ruff @@ -49,7 +49,7 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.1 + rev: v0.9.4 hooks: # Run the linter. - id: ruff diff --git a/mirror.py b/mirror.py index 7a8bbe8..a1df4cd 100644 --- a/mirror.py +++ b/mirror.py @@ -1,3 +1,12 @@ +# /// script +# requires-python = ">=3.12" +# dependencies = [ +# "packaging==23.1", +# "urllib3==2.0.5", +# ] +# /// +"""Update ruff-pre-commit to the latest version of ruff.""" + import re import subprocess import tomllib diff --git a/pyproject.toml b/pyproject.toml index 0c73fd9..9fb87e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,11 +2,5 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.8.1", -] - -[project.optional-dependencies] -dev = [ - "packaging~=23.1", - "urllib3>=2.0.5,<3.0.0", + "ruff==0.9.4", ] diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index c98d526..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,11 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile --extra=dev --generate-hashes -o requirements-dev.txt --no-emit-package=ruff pyproject.toml -packaging==23.1 \ - --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ - --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f -urllib3==2.0.5 \ - --hash=sha256:13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594 \ - --hash=sha256:ef16afa8ba34a1f989db38e1dbbe0c302e4289a47856990d0682e374563ce35e - -# The following packages were excluded from the output: -# ruff