From c39ccc0d9be22d008df8f64eb29c57caf4a4fc74 Mon Sep 17 00:00:00 2001 From: wiseaidev Date: Sat, 1 Apr 2023 15:32:10 +0300 Subject: [PATCH] add mypy & isort as pre-commit hooks --- .pre-commit-config.yaml | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a43019..eef8094 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,31 @@ +fail_fast: true +default_stages: [commit] +exclude: ".git" + repos: -- repo: https://github.com/pausan/cblack - rev: release-22.3.0 - hooks: - - id: cblack - name: cblack - description: "Black: The uncompromising Python code formatter - 2 space indent fork" - entry: cblack . -l 100 -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files - - id: check-merge-conflict + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-merge-conflict + + - repo: https://github.com/pausan/cblack + rev: release-22.3.0 + hooks: + - id: cblack + name: cblack + description: "Black: The uncompromising Python code formatter - 2 space indent fork" + entry: cblack . -l 100 + + - repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort