Skip to content

Commit 0dab007

Browse files
committed
Switch to ruff format
1 parent e42ed25 commit 0dab007

File tree

6 files changed

+4
-25
lines changed

6 files changed

+4
-25
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
runs-on: ubuntu-20.04
1818
env:
1919
TOXENV: "${{ matrix.tox-env }}"
20+
RUFF_OUTPUT_FORMAT: "github"
2021

2122
steps:
2223
- uses: actions/checkout@v4

pyproject.toml

-3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,3 @@ target-version = "py39"
6363
[tool.ruff.per-file-ignores]
6464
"yarrharr/wsgi.py" = ["E402"]
6565
"yarrharr/migrations/*.py" = ["I", "F401"]
66-
67-
[tool.black]
68-
line-length = 150

requirements_lint.in

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
ruff
2-
black>=23.3.0
1+
ruff>=0.1.8

requirements_lint.txt

-16
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,5 @@
44
#
55
# pip-compile --output-file=requirements_lint.txt requirements_lint.in
66
#
7-
black==23.10.0
8-
# via -r requirements_lint.in
9-
click==8.1.6
10-
# via black
11-
mypy-extensions==1.0.0
12-
# via black
13-
packaging==23.1
14-
# via black
15-
pathspec==0.11.2
16-
# via black
17-
platformdirs==3.10.0
18-
# via black
197
ruff==0.1.8
208
# via -r requirements_lint.in
21-
tomli==2.0.1
22-
# via black
23-
typing-extensions==4.8.0
24-
# via black

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ skip_install = true
4444
deps = -rrequirements_lint.txt
4545
commands =
4646
ruff yarrharr
47-
black --check yarrharr
47+
ruff format yarrharr
4848

4949
[testenv:deps]
5050
description = Pin dependencies

yarrharr/migrations/0009_feed_count_constraint.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
SELECT RAISE(ABORT, 'negative {column}')
3737
WHERE NEW.{column} < 0;
3838
END
39-
""".format(
40-
column=c
41-
)
39+
""".format(column=c)
4240
for c in COUNT_COLUMNS
4341
]
4442

0 commit comments

Comments
 (0)