Skip to content

Commit

Permalink
add static type checker to dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
SecretiveShell committed Sep 8, 2024
1 parent d34756d commit 2936366
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions static_analysis.bat
Original file line number Diff line number Diff line change
@@ -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
)
7 changes: 7 additions & 0 deletions static_analysis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if command -v less > /dev/null 2>&1; then
mypy start.py | less
else
mypy start.py
fi

0 comments on commit 2936366

Please sign in to comment.