Skip to content

Commit

Permalink
Ask ruff to autofix Python lint errors, where possible (#5903)
Browse files Browse the repository at this point in the history
Co-authored-by: Amaury Chamayou <[email protected]>
  • Loading branch information
eddyashton and achamayou authored Jan 10, 2024
1 parent 6a2cb50 commit 11c2737
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/ci-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function group(){
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
if [[ ${CI} ]]; then
echo "::group::$1"
else
echo "-=[ $1 ]=-"
fi
}
function endgroup() {
Expand Down Expand Up @@ -119,7 +121,11 @@ pip install -U -r python/requirements.txt 1>/dev/null
endgroup

group "Python lint"
ruff check python/ tests/
if [ $FIX -ne 0 ]; then
ruff check --fix python/ tests/
else
ruff check python/ tests/
fi
endgroup

group "Python types"
Expand Down

0 comments on commit 11c2737

Please sign in to comment.