Closed alankao64 closed 4 years ago
Seems like line 72 in check_format.sh is the issue:
if [[ $(${PY_CHECKER} -d "$filename" | wc -l) > 0 ]]; then
I don't think its catching when the wordcount is over 0.
It should be possible to use the error code returned by yapf --diff <filename>
instead of checking the size of the diff. From the YAPF docs:
If
--diff
is supplied, YAPF returns zero when no changes were necessary, non-zero otherwise
This could be due to different yapf versions? There is a system wide yapf and a local one in the venv environment?
Seems to have been resolved with PR #237
Incorrectly formatted python files aren't being caught in check_format.sh, yet when manually running YAPF, they are shown as incorrectly formatted.