pre-commit: drop black, use ruff-format instead

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>
This commit is contained in:
Peter Hutterer 2024-10-29 13:25:20 +10:00
parent 15af1c0017
commit a61c876412
2 changed files with 4 additions and 8 deletions

View file

@ -6,16 +6,13 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
- id: no-commit-to-branch - id: no-commit-to-branch
args: ['--branch', 'main'] args: ['--branch', 'main']
- repo: https://github.com/psf/black - repo: https://github.com/astral-sh/ruff-pre-commit
rev: 22.10.0 rev: v0.7.0
hooks:
- id: black
args: ['--check', '--diff', '--extend-exclude=subprojects', '.']
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
hooks: hooks:
- id: ruff - id: ruff
args: ['--ignore=E741,E501', '--extend-exclude=subprojects', '.'] args: ['--ignore=E741,E501', '--extend-exclude=subprojects', '.']
- id: ruff-format
args: ['--check', '--diff']
- repo: https://gitlab.freedesktop.org/freedesktop/ci-templates.git - repo: https://gitlab.freedesktop.org/freedesktop/ci-templates.git
rev: 7402203527f61d6473d55ad701172d1606508c52 rev: 7402203527f61d6473d55ad701172d1606508c52
hooks: hooks:

View file

@ -591,7 +591,6 @@ class TestYaml(unittest.TestCase):
for e in self.libinput_events( for e in self.libinput_events(
["TABLET_TOOL_PROXIMITY", "TABLET_TOOL_AXIS", "TABLET_TOOL_TIP"] ["TABLET_TOOL_PROXIMITY", "TABLET_TOOL_AXIS", "TABLET_TOOL_TIP"]
): ):
point = e["point"] point = e["point"]
self.assertTrue(isinstance(point, list)) self.assertTrue(isinstance(point, list))
self.assertEqual(len(point), 2) self.assertEqual(len(point), 2)