Added precommit hook addition to remove trailing spaces on lines.
if [[ -z ${SKIP_HOOK} ]]; then
command -v nox || pip install nox
echo -e '\e[1;32mRUNNING HOOKS - prepend your invocation of git commit with SKIP_HOOK=1 to skip this.\e[0m'
+ # Fix trailing whitespace in *.py files
+ find hikari tests -type f -name '*.py' -exec sed -i "s/[ ]*$//g" {} \; -exec git add {} \;
+ # Run black on specific files if needed.
nox -s check-formatting || nox -s reformat-code | grep -oP '^reformatted \K.*' | xargs -d'\n' -I '{}' git add -n '{}'
+ # Run pytest, pylint, pydocstyle in-order.
nox --sessions pytest pylint pydocstyle
else
echo -e '\e[1;31mSKIPPING COMMIT HOOKS. THIS IS HERESY!\e[0m'
