CI: pyright in github actions

This commit is contained in:
beauxq
2024-04-08 20:54:19 -07:00
parent ecb96d54ed
commit 46a486f8f0
5 changed files with 34 additions and 10 deletions

View File

@@ -1,5 +0,0 @@
if [ "$(basename "$(pwd)")" = ".github" ]; then
cd ..
fi
xargs mypy --strict --follow-imports=silent --no-warn-unused-ignore --install-types --non-interactive typings < .github/mypy_files.txt

View File

@@ -1,2 +0,0 @@
worlds/AutoSNIClient.py
Patch.py

26
.github/pyright-config.json vendored Normal file
View File

@@ -0,0 +1,26 @@
{
"include": [
"../worlds/AutoSNIClient.py",
"../Patch.py"
],
"exclude": [
"**/__pycache__"
],
"stubPath": "../typings",
"typeCheckingMode": "strict",
"reportImplicitOverride": "error",
"reportMissingImports": true,
"reportMissingTypeStubs": true,
"pythonVersion": "3.8",
"pythonPlatform": "Linux",
"executionEnvironments": [
{
"root": ".."
}
]
}

5
.github/type_check.sh vendored Executable file
View File

@@ -0,0 +1,5 @@
if [ "$(basename "$(pwd)")" = ".github" ]; then
cd ..
fi
xargs pyright -p .github/pyright-config.json

View File

@@ -20,8 +20,8 @@ jobs:
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip mypy
python -m pip install --upgrade pip pyright
python ModuleUpdate.py --append "WebHostLib/requirements.txt" --force --yes
- name: "mypy: strict check on specific files"
run: .github/mypy_check.sh
- name: "pyright: strict check on specific files"
run: .github/type_check.sh