From f093037054724c61a7f3f98fd3830ec567e0a506 Mon Sep 17 00:00:00 2001 From: Georgiy Belyanin Date: Sun, 8 Sep 2024 16:00:09 +0300 Subject: [PATCH] Add `rye format` and `rye lint` to pre-commit cfg > Set up a project. > Set up a descent linting/formatting tools. > Configure the CI. > Add modern pre-commit git hooks managers. > Not use them for running formatters and linters. This patch adds the hooks for checking formatting and linting of the python code to the pre-commit configuration. --- .pre-commit-config.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b59f44ee..f683e7626 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,3 +5,15 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace + - repo: local + hooks: + - id: check-format + name: check-format + entry: rye fmt --check + language: system + types: [python] + - id: lint + name: lint + entry: rye lint + language: system + types: [python]