Set up pre-commit to help prevent commits that wouldn't pass formatting guidelines.
This would be optional to use as CI is already checking for formatting. But having this check performed as a pre-commit hook would prevent the need for those commits whose only contribution is "formatting", as it would tell the developer something is wrong before it ever makes it into the git tree.
The hook should run:
black
isort
flake8 (Maybe worth considering. Should also be added to the make format recipe if added here.)
Here is a blog post that demonstrates how this could be done.
Set up pre-commit to help prevent commits that wouldn't pass formatting guidelines.
This would be optional to use as CI is already checking for formatting. But having this check performed as a pre-commit hook would prevent the need for those commits whose only contribution is "formatting", as it would tell the developer something is wrong before it ever makes it into the git tree.
The hook should run:
black
isort
make format
recipe if added here.)Here is a blog post that demonstrates how this could be done.