Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add static type checker to dev environment #194

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading