Skip to content

Commit

Permalink
874 pre commit hook (#876)
Browse files Browse the repository at this point in the history
* Changed .*.py --> *.py to avoid .ipynb files having yapf linting error checks run on them.

* Added directions in README_developers.md to uninstall the pre-commit hook

* Fixed pre-commit hook to catch python files.
  • Loading branch information
cdelnano authored Nov 11, 2022
1 parent a8cb84c commit 89d283a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi

echo "Begin linting step using yapf formatting"
linterrorfound=0
for stagedfile in $(git diff --name-only --cached | grep *.py)
for stagedfile in $(git diff --name-only --cached | grep ".*\.py")
do
yapf --diff --style .style.yapf $stagedfile
ret=$?
Expand Down

0 comments on commit 89d283a

Please sign in to comment.