Compare commits

...

49 Commits
v0.6.2 ... main

Author SHA1 Message Date
charliermarsh
9aeda5d1f4 Mirror: 0.11.13
Some checks failed
main / main (push) Failing after 4s
2025-06-05 21:05:24 +00:00
charliermarsh
d19233b897 Mirror: 0.11.12 2025-05-29 13:37:20 +00:00
charliermarsh
76e47323a8 Mirror: 0.11.11 2025-05-22 19:25:38 +00:00
charliermarsh
12753357c0 Mirror: 0.11.10 2025-05-15 14:15:07 +00:00
Adam Turner
39f54b73c7
Add and prefer the ruff-check pre-commit ID (#124)
## Summary

Towards #123. Introduces the `ruff-check` pre-commit hook ID, updates
documentation to prefer it, but retains the `ruff` ID for compatibility.
2025-05-13 18:46:04 +05:30
charliermarsh
24e02b24b8 Mirror: 0.11.9 2025-05-09 16:25:33 +00:00
charliermarsh
f0fe93c067 Mirror: 0.11.8 2025-05-01 14:58:49 +00:00
charliermarsh
e84319e627 Mirror: 0.11.7 2025-04-24 18:55:43 +00:00
charliermarsh
d119aaff68 Mirror: 0.11.6 2025-04-17 13:41:32 +00:00
charliermarsh
8304991d8f Mirror: 0.11.5 2025-04-10 17:19:14 +00:00
charliermarsh
9719235819 Mirror: 0.11.4 2025-04-04 18:30:03 +00:00
charliermarsh
716f3372a2 Mirror: 0.11.3 2025-04-03 13:25:45 +00:00
charliermarsh
25a8c8da6c Mirror: 0.11.2 2025-03-21 13:36:56 +00:00
charliermarsh
03d1860500 Mirror: 0.11.1 2025-03-20 15:19:35 +00:00
Zanie Blue
87c3371eb1
Add write permissions to CI workflow (#118)
See https://github.com/astral-sh/uv-pre-commit/issues/44
2025-03-18 18:07:34 -05:00
charliermarsh
99abe27a5a Mirror: 0.11.0 2025-03-14 13:58:05 +00:00
charliermarsh
2b7436a2b1 Mirror: 0.10.0 2025-03-13 18:43:38 +00:00
charliermarsh
41d2daf392 Mirror: 0.9.10 2025-03-07 15:33:19 +00:00
charliermarsh
2c8dce6094 Mirror: 0.9.9 2025-02-28 10:22:43 +00:00
charliermarsh
f78b4d43a4 Mirror: 0.9.8 2025-02-27 14:16:08 +00:00
charliermarsh
efa716b1aa Mirror: 0.9.7 2025-02-20 13:52:04 +00:00
charliermarsh
895ebb3898 Mirror: 0.9.6 2025-02-10 13:05:01 +00:00
charliermarsh
d7f0995508 Mirror: 0.9.5 2025-02-06 19:52:38 +00:00
charliermarsh
871f3bcae4 Mirror: 0.9.4 2025-01-30 18:14:53 +00:00
charliermarsh
36b36942c5 Mirror: 0.9.3 2025-01-23 19:34:23 +00:00
charliermarsh
73413df07b Mirror: 0.9.2 2025-01-16 15:51:58 +00:00
charliermarsh
18ba2d02dc Mirror: 0.9.1 2025-01-10 19:03:15 +00:00
charliermarsh
8d1fdcef55 Mirror: 0.9.0 2025-01-09 14:13:07 +00:00
charliermarsh
89c421dff2 Mirror: 0.8.6 2025-01-04 12:28:02 +00:00
charliermarsh
751b8b57ba Mirror: 0.8.5 2025-01-02 12:09:30 +00:00
Calum Young
6299d2ca23
Update mirror.py to a uv script (#110)
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

From my reading of the [UV
docs](https://docs.astral.sh/uv/guides/scripts/), `mirror.py` would be a
good example of a standalone script. This PR updates `mirror.py` and the
`main.yml` workflow to be a UV script and makes use of UV in the update
process.

## Test Plan

- Update the uv version (currently 0.8.4) to an older version e.g. 0.8.3
in both `pyproject.toml` and `README.md`
- Run `uv run --no-project mirror.py` to check the update process still
works as expected
2024-12-30 10:48:39 -05:00
charliermarsh
f0b5944bef Mirror: 0.8.4 2024-12-19 13:41:32 +00:00
charliermarsh
fc6ef5d0dd Mirror: 0.8.3 2024-12-12 15:22:54 +00:00
charliermarsh
8b76f04e7e Mirror: 0.8.2 2024-12-05 12:54:12 +00:00
charliermarsh
859e42ab7d Mirror: 0.8.1 2024-11-29 03:34:49 +00:00
charliermarsh
0710b94280 Mirror: 0.8.0 2024-11-22 10:13:07 +00:00
charliermarsh
cafecb2f68 Mirror: 0.7.4 2024-11-15 11:38:19 +00:00
charliermarsh
6a19e69c83 Mirror: 0.7.3 2024-11-08 11:27:35 +00:00
charliermarsh
52c175db9e Mirror: 0.7.2 2024-11-01 16:07:37 +00:00
charliermarsh
4edcbde74a Mirror: 0.7.1 2024-10-24 15:45:46 +00:00
charliermarsh
8983acb92e Mirror: 0.7.0 2024-10-17 19:36:30 +00:00
charliermarsh
75b98813cf Mirror: 0.6.9 2024-10-04 13:44:36 +00:00
Ruwen Frick
46cdcac1de
Update readme config examples to work with pre-commit >= 3 (#99)
Co-authored-by: Ruwen Frick <ruwen.frick@ost.ch>
2024-09-27 08:49:08 +02:00
charliermarsh
cc915bbf18 Mirror: 0.6.8 2024-09-26 12:31:46 +00:00
charliermarsh
9f089bd3b7 Mirror: 0.6.7 2024-09-21 17:40:11 +00:00
charliermarsh
ef9b09598d Mirror: 0.6.6 2024-09-20 03:32:30 +00:00
charliermarsh
79f422bd92 Mirror: 0.6.5 2024-09-13 15:04:15 +00:00
charliermarsh
03d82ba032 Mirror: 0.6.4 2024-09-05 15:55:58 +00:00
charliermarsh
f1ebc5730d Mirror: 0.6.3 2024-08-29 15:20:51 +00:00
6 changed files with 43 additions and 40 deletions

View File

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

View File

@ -1,6 +1,6 @@
- id: ruff - id: ruff-check
name: ruff name: ruff check
description: "Run 'ruff' for extremely fast Python linting" description: "Run 'ruff check' for extremely fast Python linting"
entry: ruff check --force-exclude entry: ruff check --force-exclude
language: python language: python
types_or: [python, pyi, jupyter] types_or: [python, pyi, jupyter]
@ -10,7 +10,7 @@
minimum_pre_commit_version: "2.9.2" minimum_pre_commit_version: "2.9.2"
- id: ruff-format - id: ruff-format
name: ruff-format name: ruff format
description: "Run 'ruff format' for extremely fast Python formatting" description: "Run 'ruff format' for extremely fast Python formatting"
entry: ruff format --force-exclude entry: ruff format --force-exclude
language: python language: python
@ -19,3 +19,15 @@
require_serial: true require_serial: true
additional_dependencies: [] additional_dependencies: []
minimum_pre_commit_version: "2.9.2" 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-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) [![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.6.2.svg)](https://pypi.python.org/pypi/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.6.2.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.6.2.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)
[![Actions status](https://github.com/astral-sh/ruff-pre-commit/workflows/main/badge.svg)](https://github.com/astral-sh/ruff-pre-commit/actions) [![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). A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff).
@ -17,12 +17,13 @@ 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`: (available as of Ruff v0.0.289) via pre-commit, add the following to your `.pre-commit-config.yaml`:
```yaml ```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. # Ruff version.
rev: v0.6.2 rev: v0.11.13
hooks: hooks:
# Run the linter. # Run the linter.
- id: ruff - id: ruff-check
# Run the formatter. # Run the formatter.
- id: ruff-format - id: ruff-format
``` ```
@ -30,12 +31,13 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https
To enable lint fixes, add the `--fix` argument to the lint hook: To enable lint fixes, add the `--fix` argument to the lint hook:
```yaml ```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. # Ruff version.
rev: v0.6.2 rev: v0.11.13
hooks: hooks:
# Run the linter. # Run the linter.
- id: ruff - id: ruff-check
args: [ --fix ] args: [ --fix ]
# Run the formatter. # Run the formatter.
- id: ruff-format - id: ruff-format
@ -44,12 +46,13 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes: To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes:
```yaml ```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. # Ruff version.
rev: v0.6.2 rev: v0.11.13
hooks: hooks:
# Run the linter. # Run the linter.
- id: ruff - id: ruff-check
types_or: [ python, pyi ] types_or: [ python, pyi ]
args: [ --fix ] args: [ --fix ]
# Run the formatter. # Run the formatter.

View File

@ -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 re
import subprocess import subprocess
import tomllib import tomllib

View File

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

View File

@ -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