embodiedgen/scripts/lint_src/pydocstyle.hook
Xinjie 18075659de
feat(pipeline): Add EmbodiedGen version v0.1.0. (#2)
Add EmbodiedGen version v0.1.0.
2025-06-11 22:09:22 +08:00

17 lines
367 B
Bash
Executable File

#!/bin/bash
TOTAL_ERRORS=0
if [[ ! $(which pydocstyle) ]]; then
pip install pydocstyle
fi
# diff files on local machine.
files=$(git diff --cached --name-status | awk '$1 != "D" {print $2}')
for file in $files; do
if [ "${file##*.}" == "py" ] ; then
pydocstyle $file;
TOTAL_ERRORS=$(expr $TOTAL_ERRORS + $?);
fi
done
exit $TOTAL_ERRORS