mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 17:47:30 +08:00
update ruff check
This commit is contained in:
parent
892fe927c2
commit
97cdc96f7c
@ -24,7 +24,21 @@ done
|
|||||||
|
|
||||||
if $api_modified; then
|
if $api_modified; then
|
||||||
echo "Running Ruff linter on api module"
|
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
|
fi
|
||||||
|
|
||||||
if $web_modified; then
|
if $web_modified; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user