diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b9addce..ccb29a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,45 +1,53 @@ +--- # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: check-added-large-files - - id: check-merge-conflict - - id: check-symlinks - - id: detect-private-key - - id: end-of-file-fixer - - id: trailing-whitespace - files: (.*\.(py|md|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE)$ - - repo: https://github.com/asottile/add-trailing-comma - rev: v2.1.0 - hooks: - - id: add-trailing-comma + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: check-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: check-toml + - id: check-yaml + args: [--unsafe] + - id: trailing-whitespace - - repo: local - hooks: - - id: black - name: Format with Black - entry: poetry run -C backend/app -- black - language: system - types: [python] - - id: autoflake - name: autoflake - entry: poetry run -C backend/app -- autoflake - language: system - types: [python] + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.1 + hooks: + - id: yamlfmt - - id: flake8 - name: Check with Flake8 - entry: poetry run -C backend/app -- flake8 - language: system - pass_filenames: false - types: [python] - args: [--count, .] + - repo: local + hooks: + - id: black + name: Format with Black + entry: poetry run -C backend/app -- black + language: system + types: [python] + - id: autoflake + name: autoflake + entry: poetry run -C backend/app -- autoflake + language: system + types: [python] - - id: ruff - name: Format with Ruff - entry: poetry run -C backend/app -- ruff - language: system - types: [python] - args: [--fix, --exit-non-zero-on-fix, --no-cache] + - id: flake8 + name: Check with Flake8 + entry: poetry run -C backend/app -- flake8 + language: system + pass_filenames: false + types: [python] + args: [--count, .] + + - id: ruff + name: Format with Ruff + entry: poetry run -C backend/app -- ruff + language: system + types: [python] + args: [--fix, --exit-non-zero-on-fix, --no-cache] + +ci: + autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks + autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate