Skip to content

Commit

Permalink
Switch to ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Dec 18, 2023
1 parent e42ed25 commit 0dab007
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-20.04
env:
TOXENV: "${{ matrix.tox-env }}"
RUFF_OUTPUT_FORMAT: "github"

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,3 @@ target-version = "py39"
[tool.ruff.per-file-ignores]
"yarrharr/wsgi.py" = ["E402"]
"yarrharr/migrations/*.py" = ["I", "F401"]

[tool.black]
line-length = 150
3 changes: 1 addition & 2 deletions requirements_lint.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ruff
black>=23.3.0
ruff>=0.1.8
16 changes: 0 additions & 16 deletions requirements_lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,5 @@
#
# pip-compile --output-file=requirements_lint.txt requirements_lint.in
#
black==23.10.0
# via -r requirements_lint.in
click==8.1.6
# via black
mypy-extensions==1.0.0
# via black
packaging==23.1
# via black
pathspec==0.11.2
# via black
platformdirs==3.10.0
# via black
ruff==0.1.8
# via -r requirements_lint.in
tomli==2.0.1
# via black
typing-extensions==4.8.0
# via black
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ skip_install = true
deps = -rrequirements_lint.txt
commands =
ruff yarrharr
black --check yarrharr
ruff format yarrharr

[testenv:deps]
description = Pin dependencies
Expand Down
4 changes: 1 addition & 3 deletions yarrharr/migrations/0009_feed_count_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
SELECT RAISE(ABORT, 'negative {column}')
WHERE NEW.{column} < 0;
END
""".format(
column=c
)
""".format(column=c)
for c in COUNT_COLUMNS
]

Expand Down

0 comments on commit 0dab007

Please sign in to comment.