mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 10:56:52 +08:00
chore: use poetry for linter tools installation and bump Ruff from 0.4 to 0.5 (#6081)
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user