Compare commits

...

6 Commits

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
3 changed files with 26 additions and 14 deletions

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.11.8.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.11.8.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.8.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).
@ -20,10 +20,10 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https
repos: 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.11.8 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
``` ```
@ -34,10 +34,10 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
repos: 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.11.8 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
@ -49,10 +49,10 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed
repos: 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.11.8 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

@ -2,5 +2,5 @@
name = "ruff-pre-commit" name = "ruff-pre-commit"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"ruff==0.11.8", "ruff==0.11.13",
] ]