chore: use poetry for linter tools installation and bump Ruff from 0.4 to 0.5 (#6081)

This commit is contained in:
Bowen Liang
2024-07-09 23:06:23 +08:00
committed by GitHub
parent 757ceda063
commit f9d00e0498
4 changed files with 33 additions and 33 deletions

View File

@@ -27,10 +27,14 @@ if $api_modified; then
# python style checks rely on `ruff` in path
if ! command -v ruff &> /dev/null; then
echo "Installing Ruff ..."
pip install ruff
echo "Installing linting tools (Ruff, dotenv-linter ...) ..."
poetry install -C api --only lint
fi
# run Ruff linter auto-fixing
ruff check --fix ./api
# run Ruff linter checks
ruff check --preview ./api || status=$?
status=${status:-0}