From b0fcac6c34d3633e79e3e635c59a363a60c4d01e Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 20 Jul 2025 00:07:45 +0200 Subject: [PATCH] Add ruff and flake8 to .pre-commit-config.yaml --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1844f7f2f..f6335af2e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,6 +20,20 @@ repos: files: \.(cmake|CMakeLists\.txt)$ exclude: ^(3rdparty/|build.*/|install/) + # Ruff Python linter + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.12.4 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format + + # Flake8 Python style/lint checker (supplemental to Ruff) + - repo: https://github.com/pycqa/flake8 + rev: 7.3.0 + hooks: + - id: flake8 + # Configuration default_stages: [pre-commit] fail_fast: false