Setup pre-commit
This commit is contained in:
parent
37883584a8
commit
469e69e8b8
2 changed files with 13 additions and 0 deletions
7
.git-hooks/pre-commit
Executable file
7
.git-hooks/pre-commit
Executable file
|
@ -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
|
6
.pre-commit-config.yaml
Normal file
6
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
|
rev: 24.10.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
language_version: python3
|
Loading…
Reference in a new issue