]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
pre-commit: Switch to ruff
authorStephen Finucane <stephen@that.guru>
Tue, 16 Jan 2024 21:53:00 +0000 (21:53 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 16 Jan 2024 21:58:30 +0000 (21:58 +0000)
Signed-off-by: Stephen Finucane <stephen@that.guru>
.pre-commit-config.yaml
pyproject.toml

index 2114b236bd235308e28bf1d162b74a94f2ea52dd..367d7e05c696e69d645bbb9ca6034f6620943b52 100644 (file)
@@ -20,10 +20,14 @@ repos:
         exclude: (.*\.mbox)|(.*\.svg)|(.*\.sql)|(.*\.conf)
       - id: remove-crlf
         exclude: (.*\.mbox)|(.*\.svg)
-  - repo: https://github.com/pycqa/flake8
-    rev: 7.0.0
+  - repo: https://github.com/astral-sh/ruff-pre-commit
+    # Ruff version.
+    rev: v0.1.13
     hooks:
-      - id: flake8
+      # Run the linter.
+      - id: ruff
+      # Run the formatter.
+      - id: ruff-format
   - repo: https://github.com/openstack/bashate
     rev: 2.1.1
     hooks:
@@ -33,7 +37,3 @@ repos:
     hooks:
       - id: vacuum
         files: ^docs/api/schemas/(latest|v\d\.\d)/patchwork.yaml
-  - repo: https://github.com/psf/black
-    rev: 23.12.1
-    hooks:
-      - id: black
index d3728bae84c5a735263269a1e3fe3529583d9281..d7cd0154f7a3a58425872501e6d9b66bf160b2e8 100644 (file)
@@ -1,3 +1,5 @@
-[tool.black]
+[tool.ruff]
 line-length = 79
-skip-string-normalization = true
+
+[tool.ruff.format]
+quote-style = "single"