From: Peter Hutterer Date: Tue, 29 Oct 2024 03:25:20 +0000 (+1000) Subject: pre-commit: drop black, use ruff-format instead X-Git-Tag: 1.27.0~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a61c8764120c09a3df61cbf0a010d54008df22dd;p=platform%2Fupstream%2Flibinput.git 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: --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f9763e7d..54a4e627 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/tools/libinput-record-verify-yaml.py b/tools/libinput-record-verify-yaml.py index ff9717a2..ec5fbd06 100755 --- a/tools/libinput-record-verify-yaml.py +++ b/tools/libinput-record-verify-yaml.py @@ -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)