From 0f0acb2487f5cda932f370315e1511fd47a4e200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heinz-Alexander=20F=C3=BCtterer?= <35225576+afuetterer@users.noreply.github.com> Date: Mon, 11 May 2026 20:11:36 +0200 Subject: [PATCH] chore: add ruff pre-commit hook --- .pre-commit-config.yaml | 6 ++++++ pyproject.toml | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3731d4ff..88601caa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,3 +18,9 @@ repos: - id: end-of-file-fixer exclude_types: [csv] - id: trailing-whitespace + +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: 6fec9b7edb08fd9989088709d864a7826dc74e80 # frozen: v0.15.12 + hooks: + - id: ruff-check + args: [--fix, --show-fixes, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 484cbd06..73afd83c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,3 +74,13 @@ run.source = [ "tika" ] run.branch = true report.skip_covered = true report.show_missing = true + +[tool.ruff] +src = [ "tika", "tests" ] +lint.select = [ + "E4", # pycodestyle + "E7", # pycodestyle + "E9", # pycodestyle + "F", # pyflakes + "I", # isort +]