Skip to content

Commit 0e9be7f

Browse files
committed
Add Pyright CI workflow
1 parent 55a3837 commit 0e9be7f

File tree

5 files changed

+105
-0
lines changed

5 files changed

+105
-0
lines changed

.github/workflows/pyright.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on: [ push, pull_request ]
2+
name: Pyright type checking
3+
jobs:
4+
pyright:
5+
runs-on: ubuntu-latest
6+
container:
7+
image: archlinux/archlinux:latest
8+
steps:
9+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
10+
- name: Prepare arch
11+
run: |
12+
pacman-key --init
13+
pacman --noconfirm -Sy archlinux-keyring
14+
pacman --noconfirm -Syyu
15+
pacman --noconfirm -Sy python-pip python-pyparted pkgconfig gcc nodejs npm
16+
- run: pip install --break-system-packages --upgrade pip
17+
- name: Install Python dependencies
18+
run: pip install --break-system-packages
19+
- name: Install Node.js dependencies
20+
run: npm install
21+
- name: Display Pyright version
22+
run: npx --no -- pyright --version
23+
- name: Run Pyright
24+
run: npx --no -- pyright

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ requirements.txt
3939
/.gitconfig
4040
/actions-runner
4141
/cmd_output.txt
42+
node_modules/
4243
uv.lock

package-lock.json

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"devDependencies": {
3+
"pyright": "1.1.402"
4+
}
5+
}

pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,34 @@ ignore = [
230230

231231
[tool.ruff.lint.mccabe]
232232
max-complexity = 40
233+
234+
[tool.pyright]
235+
pythonVersion = "3.12"
236+
typeCheckingMode = "strict"
237+
exclude = [
238+
"**/node_modules",
239+
"*/__pycache__",
240+
"**/.*",
241+
"build/",
242+
]
243+
reportArgumentType = false
244+
reportAttributeAccessIssue = false
245+
reportMatchNotExhaustive = false
246+
reportMissingTypeStubs = false
247+
reportPrivateUsage = false
248+
reportTypedDictNotRequiredAccess = false
249+
reportUnknownArgumentType = false
250+
reportUnknownLambdaType = false
251+
reportUnknownMemberType = false
252+
reportUnknownVariableType = false
253+
reportUnnecessaryComparison = false
254+
255+
# Additional flags that are not included in strict mode
256+
deprecateTypingAliases = true
257+
reportImplicitOverride = true
258+
reportImportCycles = false
259+
reportPropertyTypeMismatch = true
260+
reportShadowedImports = true
261+
strictDictionaryInference = true
262+
strictListInference = true
263+
strictSetInference = true

0 commit comments

Comments
 (0)