Compare commits

..

No commits in common. "main" and "v0.6.7" have entirely different histories.
main ... v0.6.7

6 changed files with 40 additions and 43 deletions

View File

@ -10,23 +10,27 @@ jobs:
build:
name: main
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- if: ${{ startsWith(github.event_name, 'repository_dispatch') }}
run: sleep 30
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- 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: set git config
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- run: uv run --no-project mirror.py
- run: python mirror.py
- name: check for unpushed commits
id: check_unpushed

View File

@ -1,6 +1,6 @@
- id: ruff-check
name: ruff check
description: "Run 'ruff check' for extremely fast Python linting"
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
entry: ruff check --force-exclude
language: python
types_or: [python, pyi, jupyter]
@ -10,7 +10,7 @@
minimum_pre_commit_version: "2.9.2"
- id: ruff-format
name: ruff format
name: ruff-format
description: "Run 'ruff format' for extremely fast Python formatting"
entry: ruff format --force-exclude
language: python
@ -19,15 +19,3 @@
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"
# Legacy alias
- id: ruff
name: ruff (legacy alias)
description: "Run 'ruff check' for extremely fast Python linting"
entry: ruff check --force-exclude
language: python
types_or: [python, pyi, jupyter]
args: []
require_serial: true
additional_dependencies: []
minimum_pre_commit_version: "2.9.2"

View File

@ -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.11.13.svg)](https://pypi.python.org/pypi/ruff)
[![image](https://img.shields.io/pypi/l/ruff/0.11.13.svg)](https://pypi.python.org/pypi/ruff)
[![image](https://img.shields.io/pypi/pyversions/ruff/0.11.13.svg)](https://pypi.python.org/pypi/ruff)
[![image](https://img.shields.io/pypi/v/ruff/0.6.7.svg)](https://pypi.python.org/pypi/ruff)
[![image](https://img.shields.io/pypi/l/ruff/0.6.7.svg)](https://pypi.python.org/pypi/ruff)
[![image](https://img.shields.io/pypi/pyversions/ruff/0.6.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).
@ -17,13 +17,12 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https
(available as of Ruff v0.0.289) via pre-commit, add the following to your `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.13
rev: v0.6.7
hooks:
# Run the linter.
- id: ruff-check
- id: ruff
# Run the formatter.
- id: ruff-format
```
@ -31,13 +30,12 @@ repos:
To enable lint fixes, add the `--fix` argument to the lint hook:
```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.13
rev: v0.6.7
hooks:
# Run the linter.
- id: ruff-check
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
@ -46,13 +44,12 @@ repos:
To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes:
```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.13
rev: v0.6.7
hooks:
# Run the linter.
- id: ruff-check
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.

View File

@ -1,12 +1,3 @@
# /// 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

View File

@ -2,5 +2,11 @@
name = "ruff-pre-commit"
version = "0.0.0"
dependencies = [
"ruff==0.11.13",
"ruff==0.6.7",
]
[project.optional-dependencies]
dev = [
"packaging~=23.1",
"urllib3>=2.0.5,<3.0.0",
]

11
requirements-dev.txt Normal file
View File

@ -0,0 +1,11 @@
# 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