From 695f0977d6c375d9ef17f05c1f35b824557184b9 Mon Sep 17 00:00:00 2001 From: Dionisio E Alonso Date: Mon, 26 Feb 2024 11:18:36 -0300 Subject: [PATCH] feat(templates): Add new python hook for pre-commit For the pre-commit-config.yaml added the Ruff hook and, as Ruff is being configured via TOML file instead of inline command line arguments, also added the toml checker. --- templates/_pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/_pre-commit-config.yaml b/templates/_pre-commit-config.yaml index d2bffc6..6fa6313 100644 --- a/templates/_pre-commit-config.yaml +++ b/templates/_pre-commit-config.yaml @@ -4,10 +4,17 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer + - id: check-toml - id: check-yaml exclude: .chart/ - id: check-added-large-files +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.2.2 + hooks: + - id: ruff + args: [--config=./backoffice/ceg/pyproject.toml] + - repo: https://github.com/PyCQA/flake8 rev: 7.0.0 hooks: