Skip to content

Commit 39c25a0

Browse files
committed
Add Pyright CI workflow
1 parent c9d28e0 commit 39c25a0

5 files changed

Lines changed: 106 additions & 0 deletions

File tree

.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 .[dev]
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.403"
4+
}
5+
}

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ testpaths = ["tests"]
136136
ignore-paths = [
137137
"^build/",
138138
"^docs/",
139+
"^node_modules/",
139140
]
140141
load-plugins = ["pylint_pydantic"]
141142
persistent = false
@@ -230,3 +231,34 @@ ignore = [
230231

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

0 commit comments

Comments
 (0)