Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

sanity-check.sh: disable some spurious warnings #126

Merged
merged 2 commits into from
Jan 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ci/sanity-check/sanity-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,17 @@ printf "Running black on python files...\n"
printf "%s" "$PYTHON_FILES" | xargs --no-run-if-empty black --line-length 79 -v --check --diff || rc=1

# Run pycodestyle on python files
# Ignore E203 errors though - they can be spurious
# (https://github.com/PyCQA/pycodestyle/issues/373)
printf "Running pycodestyle on python files...\n"
printf "%s" "$PYTHON_FILES" | xargs --no-run-if-empty pycodestyle || rc=1
printf "%s" "$PYTHON_FILES" | xargs --no-run-if-empty pycodestyle --ignore=E203 || rc=1

# Run pydocstyle on python files
# When pydocstyle is given a directory to check it will, by default, skip
# "test_" files. We're passing pydocstyle full paths to each file though, and
# the directory part of the paths prevent "test_" files matching pydocstyle's
# filter. Adjust it here so that "test_" files are actually skipped.
printf "Running pydocstyle on python files...\n"
printf "%s" "$PYTHON_FILES" | xargs --no-run-if-empty pydocstyle || rc=1
printf "%s" "$PYTHON_FILES" | xargs --no-run-if-empty pydocstyle --match='(?!.*test_).*\.py' || rc=1

exit "$rc"