From 90ba659a705d62a0e706271ac0b7b784469ddaf3 Mon Sep 17 00:00:00 2001 From: ARYAN-NIKNEZHAD Date: Tue, 20 Aug 2024 06:11:38 +0430 Subject: [PATCH] :wrench: chore: Add-pre-commit-config - Hook for checks - Hook for Isort - Hook for black --- .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..bb4606f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + exclude: (migrations/|tests/|docs/|static/|media/).* + - id: end-of-file-fixer + exclude: (migrations/|tests/|docs/|static/|media/).* + - id: check-added-large-files + exclude: (migrations/|tests/|docs/|static/|media/).* + - id: check-case-conflict + exclude: (migrations/|tests/|docs/|static/|media/).* + - id: check-merge-conflict + exclude: (migrations/|tests/|docs/|static/|media/).* + - id: check-docstring-first + exclude: (migrations/|tests/|docs/|static/|media/).* + + + - repo: https://github.com/pre-commit/mirrors-isort + rev: v5.10.1 + hooks: + - id: isort + exclude: (migrations/|tests/|docs/|static/|media/).* + + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + exclude: (migrations/|tests/|docs/|static/|media/).* \ No newline at end of file