update ruff check

This commit is contained in:
takatost 2024-03-05 17:35:05 +08:00
parent 892fe927c2
commit 97cdc96f7c
1 changed files with 15 additions and 1 deletions

View File

@ -24,7 +24,21 @@ done
if $api_modified; then
echo "Running Ruff linter on api module"
./dev/reformat
# python style checks rely on `ruff` in path
if ! command -v ruff &> /dev/null; then
echo "Installing Ruff ..."
pip install ruff
fi
ruff check ./api
result=$?
if [ $result -ne 0 ]; then
echo "Please run 'dev/reformat' to fix the fixable linting errors."
fi
exit $result
fi
if $web_modified; then