mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
add lint full script
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+1
-1
Submodule extensions-builtin/sdnq updated: 996f3acd6c...5bd24ef2dd
@@ -1,8 +1,5 @@
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from modules import shared, images, devices, errors, scripts_manager, scripts_postprocessing, infotext
|
||||
from modules.logger import log
|
||||
from modules.shared import opts
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@
|
||||
"ty": ". venv/bin/activate && ty check --force-exclude",
|
||||
"codespell": ". venv/bin/activate && codespell",
|
||||
"compile": ". venv/bin/activate && python test/test-compile.py",
|
||||
"full": "npm run lint && npm run codespell && npm run ty && npm run pyright"
|
||||
"full": "npm run precommit && npm run eslint && npm run tsc && npm run ruff && npm run pylint && npm run codespell && npm run ty && npm run pyright"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.1.0",
|
||||
|
||||
@@ -46,7 +46,6 @@ typing-extensions==4.16.0
|
||||
sentencepiece==0.2.1
|
||||
|
||||
# lint
|
||||
ty
|
||||
ruff
|
||||
pylint
|
||||
pre-commit
|
||||
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
run_test() {
|
||||
local name="$1"
|
||||
shift
|
||||
echo "# Start: $name"
|
||||
if "$@"; then
|
||||
echo "# End: Pass $name"
|
||||
return 0
|
||||
else
|
||||
echo "# End: Fail $name"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "# SD.Next Static Checks"
|
||||
echo "# Activate VENV"
|
||||
source venv/bin/activate || true
|
||||
echo "# Install toolkit"
|
||||
pip install -U pre-commit ruff pylint codespell ty pyright || true
|
||||
|
||||
run_test "Precommit" npm run precommit || true
|
||||
run_test "ESLint" npm run eslint || true
|
||||
run_test "TypeScript" npm run tsc || true
|
||||
run_test "Ruff" npm run ruff || true
|
||||
run_test "Pylint" npm run pylint || true
|
||||
run_test "Codespell" npm run codespell || true
|
||||
run_test "Ty" npm run ty || true
|
||||
run_test "Pyright" npm run pyright || true
|
||||
|
||||
echo "Done..."
|
||||
Reference in New Issue
Block a user