Skip to content

Commit 9088e4c

Browse files
authored
Move Ruff to pre-commit to pin it (#250)
1 parent ab7fd04 commit 9088e4c

5 files changed

Lines changed: 15 additions & 19 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ env:
88
FORCE_COLOR: 1
99

1010
jobs:
11-
tox-jobs:
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
tox-job: [doc, pep8]
11+
doc:
1612
runs-on: ubuntu-latest
1713
steps:
1814
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -22,7 +18,7 @@ jobs:
2218
with:
2319
python-version: 3.x
2420
- run: pip install tox
25-
- run: tox -e ${{ matrix.tox-job }}
21+
- run: tox -e doc
2622
build:
2723
runs-on: ${{ matrix.os }}
2824
name: ${{ matrix.os }} - ${{ matrix.python }} ${{ matrix.build }}

.github/workflows/lint.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ permissions: {}
66

77
env:
88
FORCE_COLOR: 1
9+
RUFF_OUTPUT_FORMAT: github
910

1011
jobs:
1112
lint:
@@ -15,8 +16,4 @@ jobs:
1516
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1617
with:
1718
persist-credentials: false
18-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
19-
with:
20-
python-version: "3.x"
21-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
2219
- uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4

.pre-commit-config.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.15.22
4+
hooks:
5+
- id: ruff-check
6+
args: [--exit-non-zero-on-fix]
7+
28
- repo: https://github.com/pre-commit/pre-commit-hooks
39
rev: v6.0.0
410
hooks:
@@ -14,7 +20,7 @@ repos:
1420
- id: trailing-whitespace
1521

1622
- repo: https://github.com/python-jsonschema/check-jsonschema
17-
rev: 0.37.1
23+
rev: 0.37.4
1824
hooks:
1925
- id: check-dependabot
2026
- id: check-github-workflows
@@ -25,7 +31,7 @@ repos:
2531
- id: actionlint
2632

2733
- repo: https://github.com/zizmorcore/zizmor-pre-commit
28-
rev: v1.24.1
34+
rev: v1.29.0
2935
hooks:
3036
- id: zizmor
3137

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ packages = ["pyperf", "pyperf.tests"]
7575
[tool.setuptools.dynamic]
7676
version = {attr = "pyperf.__version__"}
7777

78+
[tool.ruff]
79+
fix = true
80+
7881
[tool.ruff.lint]
7982
extend-select = ["C90", "UP"]
8083
extend-ignore = ["UP015", "UP031"]

tox.ini

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3, pypy3, doc, pep8
2+
envlist = py3, pypy3, doc
33
isolated_build = True
44

55
[testenv]
@@ -16,9 +16,3 @@ deps = sphinx
1616
allowlist_externals = make
1717
commands=
1818
make -C doc html
19-
20-
[testenv:pep8]
21-
basepython = python3
22-
deps = ruff
23-
commands =
24-
ruff check

0 commit comments

Comments
 (0)