Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9aeda5d1f4 | ||
![]() |
d19233b897 | ||
![]() |
76e47323a8 | ||
![]() |
12753357c0 | ||
![]() |
39f54b73c7 | ||
![]() |
24e02b24b8 | ||
![]() |
f0fe93c067 | ||
![]() |
e84319e627 | ||
![]() |
d119aaff68 | ||
![]() |
8304991d8f | ||
![]() |
9719235819 | ||
![]() |
716f3372a2 | ||
![]() |
25a8c8da6c | ||
![]() |
03d1860500 | ||
![]() |
87c3371eb1 | ||
![]() |
99abe27a5a | ||
![]() |
2b7436a2b1 | ||
![]() |
41d2daf392 | ||
![]() |
2c8dce6094 | ||
![]() |
f78b4d43a4 | ||
![]() |
efa716b1aa | ||
![]() |
895ebb3898 | ||
![]() |
d7f0995508 | ||
![]() |
871f3bcae4 | ||
![]() |
36b36942c5 | ||
![]() |
73413df07b | ||
![]() |
18ba2d02dc | ||
![]() |
8d1fdcef55 | ||
![]() |
89c421dff2 | ||
![]() |
751b8b57ba | ||
![]() |
6299d2ca23 | ||
![]() |
f0b5944bef | ||
![]() |
fc6ef5d0dd | ||
![]() |
8b76f04e7e | ||
![]() |
859e42ab7d | ||
![]() |
0710b94280 | ||
![]() |
cafecb2f68 | ||
![]() |
6a19e69c83 | ||
![]() |
52c175db9e | ||
![]() |
4edcbde74a | ||
![]() |
8983acb92e | ||
![]() |
75b98813cf | ||
![]() |
46cdcac1de | ||
![]() |
cc915bbf18 | ||
![]() |
9f089bd3b7 | ||
![]() |
ef9b09598d | ||
![]() |
79f422bd92 | ||
![]() |
03d82ba032 | ||
![]() |
f1ebc5730d |
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@ -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
|
||||||
|
@ -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"
|
||||||
|
21
README.md
21
README.md
@ -1,9 +1,9 @@
|
|||||||
# ruff-pre-commit
|
# ruff-pre-commit
|
||||||
|
|
||||||
[](https://github.com/astral-sh/ruff)
|
[](https://github.com/astral-sh/ruff)
|
||||||
[](https://pypi.python.org/pypi/ruff)
|
[](https://pypi.python.org/pypi/ruff)
|
||||||
[](https://pypi.python.org/pypi/ruff)
|
[](https://pypi.python.org/pypi/ruff)
|
||||||
[](https://pypi.python.org/pypi/ruff)
|
[](https://pypi.python.org/pypi/ruff)
|
||||||
[](https://github.com/astral-sh/ruff-pre-commit/actions)
|
[](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.
|
||||||
|
@ -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
|
||||||
|
@ -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",
|
|
||||||
]
|
]
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user