From 71b47091717bd2a3032cb92d64e7644d92c15ab4 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 19 Feb 2026 01:34:35 +0000 Subject: [PATCH] Update styling automation --- .flake8 | 8 ++++++++ .pre-commit-config.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .flake8 create mode 100644 .pre-commit-config.yaml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..506581e --- /dev/null +++ b/.flake8 @@ -0,0 +1,8 @@ +[flake8] +max-line-length = 88 +extend-ignore = + E203, + E231, + E501, + E702, + W291 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..23c9d5b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +repos: + - repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + exclude: ^core/migrations + - repo: https://github.com/PyCQA/isort + rev: 5.11.5 + hooks: + - id: isort + args: ["--profile", "black"] + - repo: https://github.com/PyCQA/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + args: [--max-line-length=88] + exclude: ^core/migrations + - repo: https://github.com/rtts/djhtml + rev: v2.0.0 + hooks: + - id: djhtml + args: [-t 2] + - id: djcss + exclude : ^core/static/css # slow + - id: djjs + exclude: ^core/static/js # slow + - repo: https://github.com/sirwart/ripsecrets.git + rev: v0.1.5 + hooks: + - id: ripsecrets