From 305c2122e319b5ff6deb8939db8fdc88c63d7094 Mon Sep 17 00:00:00 2001 From: "Aapo (f021b) Rista" Date: Tue, 15 Aug 2023 13:19:40 +0300 Subject: [PATCH] Add pre-commit config --- .pre-commit-config.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..e99930c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +exclude: .*migrations\/.* +repos: + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + - id: debug-statements + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: 'v0.0.284' + hooks: + - id: ruff + # Respect `exclude` and `extend-exclude` settings. + # args: ["--force-exclude", --line-length, "120"] + args: ["--line-length", "120"] + + - repo: https://github.com/psf/black + rev: 23.7.0 + hooks: + - id: black + args: [ --line-length=120 ] + + - repo: https://github.com/myint/autoflake + rev: v2.2.0 + hooks: + - id: autoflake + exclude: migrations