Skip to content

Commit

Permalink
Use pipe pylint result to sort -u for error deduplication (#9893)
Browse files Browse the repository at this point in the history
Due to an pylint issue pylint-dev/pylint#3584
single error/warning is printed multiple times when using
pylint in multiprocessing mode

GitOrigin-RevId: b823f8a2e833444b2ede28b206ed53aa057acb48
  • Loading branch information
turbaszek authored and Cloud Composer Team committed Aug 27, 2022
1 parent 4d95529 commit 58f5987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ci/in_container/run_pylint_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ if [[ ${#@} == "0" ]]; then
find "./tests" "./kubernetes_tests" -name "*.py" | \
grep -vFf scripts/ci/pylint_todo.txt | \
# running pylint using built-in parallel functionality might speed it up
xargs pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized
xargs pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized | sort -u
RES=$?
else
# running pylint using built-in parallel functionality might speed it up
pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized "$@"
pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized "$@" | sort -u
RES=$?
fi

Expand Down

0 comments on commit 58f5987

Please sign in to comment.