diff --git a/pyproject.toml b/pyproject.toml index b9e80fed..ded09dc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,8 @@ extras = [ "sentence-transformers", ] dev = [ - "ruff == 0.3.2" + "ruff == 0.3.2", + "mypy", ] cu121 = [ # Torch (Extra index URLs not support in pyproject.toml) diff --git a/static_analysis.bat b/static_analysis.bat new file mode 100644 index 00000000..8880b644 --- /dev/null +++ b/static_analysis.bat @@ -0,0 +1,11 @@ +@echo off + +:: check if less is installed +:: run scoop install less +:: https://scoop.sh/#/apps?q=less&id=e084d861765203aae2d64ada4e59ef350df0f25b +where less >nul 2>&1 +if %errorlevel%==0 ( + mypy start.py | less +) else ( + mypy start.py +) diff --git a/static_analysis.sh b/static_analysis.sh new file mode 100644 index 00000000..22558e2f --- /dev/null +++ b/static_analysis.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if command -v less > /dev/null 2>&1; then + mypy start.py | less +else + mypy start.py +fi \ No newline at end of file