pre-commit: drop black, use ruff-format instead
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 29 Oct 2024 03:25:20 +0000 (13:25 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 29 Oct 2024 03:48:31 +0000 (13:48 +1000)
And switch to the current-ish version of the ruff pre-commit hook,
including updating the repo.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1072>

.pre-commit-config.yaml
tools/libinput-record-verify-yaml.py

index f9763e7d381f016a477b5c203dfef87fb86ab95b..54a4e6273eaa6b9660d0370e4fdd9f47b2dcb9a6 100644 (file)
@@ -6,16 +6,13 @@ repos:
   - id: trailing-whitespace
   - id: no-commit-to-branch
     args: ['--branch', 'main']
-- repo: https://github.com/psf/black
-  rev: 22.10.0
-  hooks:
-  - id: black
-    args: ['--check', '--diff', '--extend-exclude=subprojects', '.']
-- repo: https://github.com/charliermarsh/ruff-pre-commit
-  rev: v0.0.254
+- repo: https://github.com/astral-sh/ruff-pre-commit
+  rev: v0.7.0
   hooks:
   - id: ruff
     args: ['--ignore=E741,E501', '--extend-exclude=subprojects', '.']
+  - id: ruff-format
+    args: ['--check', '--diff']
 - repo: https://gitlab.freedesktop.org/freedesktop/ci-templates.git
   rev: 7402203527f61d6473d55ad701172d1606508c52
   hooks:
index ff9717a2ad0698653c7780526c68edfe07e59f7a..ec5fbd06eea0eda721e39998b13b0a29fcceeee6 100755 (executable)
@@ -591,7 +591,6 @@ class TestYaml(unittest.TestCase):
         for e in self.libinput_events(
             ["TABLET_TOOL_PROXIMITY", "TABLET_TOOL_AXIS", "TABLET_TOOL_TIP"]
         ):
-
             point = e["point"]
             self.assertTrue(isinstance(point, list))
             self.assertEqual(len(point), 2)