Skip to content

Commit

Permalink
Added lint pre-commit hook
Browse files Browse the repository at this point in the history
Added a quick pre-commit hook that will apply the black formatter with
the same params used in the GitHub action.
  • Loading branch information
TimothyWillard committed Oct 25, 2024
1 parent d310fed commit 1752ce1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
if which black > /dev/null 2>&1; then
black --line-length 92 \
--extend-exclude 'flepimop/gempyor_pkg/src/gempyor/steps_rk4.py' \
--check --verbose .
else
echo "'black' is not available so python files will not be checked."
fi

0 comments on commit 1752ce1

Please sign in to comment.