From 0dab007ba624f546e941be1c0d246cef1753a80d Mon Sep 17 00:00:00 2001 From: Tom Most Date: Sun, 17 Dec 2023 23:49:40 -0800 Subject: [PATCH] Switch to ruff format --- .github/workflows/ci.yml | 1 + pyproject.toml | 3 --- requirements_lint.in | 3 +-- requirements_lint.txt | 16 ---------------- tox.ini | 2 +- .../migrations/0009_feed_count_constraint.py | 4 +--- 6 files changed, 4 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e3b385b..c4eff656 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-20.04 env: TOXENV: "${{ matrix.tox-env }}" + RUFF_OUTPUT_FORMAT: "github" steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index cef25173..01d17d5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/requirements_lint.in b/requirements_lint.in index 3869549b..f7d2f9dc 100644 --- a/requirements_lint.in +++ b/requirements_lint.in @@ -1,2 +1 @@ -ruff -black>=23.3.0 +ruff>=0.1.8 diff --git a/requirements_lint.txt b/requirements_lint.txt index 35e46cd4..b9bd46a2 100644 --- a/requirements_lint.txt +++ b/requirements_lint.txt @@ -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 diff --git a/tox.ini b/tox.ini index b8ad3c02..66d4d315 100644 --- a/tox.ini +++ b/tox.ini @@ -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 diff --git a/yarrharr/migrations/0009_feed_count_constraint.py b/yarrharr/migrations/0009_feed_count_constraint.py index 28ebe9c9..153262cd 100644 --- a/yarrharr/migrations/0009_feed_count_constraint.py +++ b/yarrharr/migrations/0009_feed_count_constraint.py @@ -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 ]