From 77216de123116e27cf181868cbd9d9e7e73a9e09 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Tue, 21 Jan 2025 13:57:33 -0600 Subject: [PATCH] Setup pre-commit --- .git-hooks/pre-commit | 7 +++++++ .pre-commit-config.yaml | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 .git-hooks/pre-commit create mode 100644 .pre-commit-config.yaml diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit new file mode 100644 index 00000000..9757c733 --- /dev/null +++ b/.git-hooks/pre-commit @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Running pre-commit hook" +pre-commit run -a +git diff --name-only --cached | xargs git add +echo "Re-running pre-commit hook, to check for actual (non-formatting) errors" +pre-commit run -a diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..c9b64f46 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.10.0 + hooks: + - id: black + language_version: python3