-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.bat
More file actions
40 lines (34 loc) · 1.17 KB
/
check.bat
File metadata and controls
40 lines (34 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
rem docsource: Parse, check and update doc-string documentation
rem
rem Copyright 2025-2026, Levente Hunyadi
rem https://github.com/hunyadi/docsource
setlocal
set PYTHON_310="C:\Program Files\Python310\python.exe"
set PYTHON_311="C:\Program Files\Python311\python.exe"
set PYTHON_312="C:\Program Files\Python312\python.exe"
set PYTHON_313="C:\Program Files\Python313\python.exe"
set PYTHON_314="C:\Program Files\Python314\python.exe"
rem Run static type checker and verify formatting guidelines
%PYTHON_314% -m ruff check
if errorlevel 1 goto error
%PYTHON_314% -m ruff format --check
if errorlevel 1 goto error
%PYTHON_314% -m mypy docsource
if errorlevel 1 goto error
%PYTHON_314% -m mypy test
if errorlevel 1 goto error
if exist %PYTHON_310% %PYTHON_310% -m unittest discover
if errorlevel 1 goto error
if exist %PYTHON_311% %PYTHON_311% -m unittest discover
if errorlevel 1 goto error
if exist %PYTHON_312% %PYTHON_312% -m unittest discover
if errorlevel 1 goto error
if exist %PYTHON_313% %PYTHON_313% -m unittest discover
if errorlevel 1 goto error
if exist %PYTHON_314% %PYTHON_314% -m unittest discover
if errorlevel 1 goto error
goto EOF
:error
exit /b %errorlevel%
:EOF