Skip to content

Commit c6b0caa

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

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-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 dependencies
18+
run: pip install --break-system-packages .[dev]
19+
- name: Install Pyright
20+
run: npm install pyright
21+
- name: Display Pyright version
22+
run: npm exec pyright --version
23+
- name: Run Pyright
24+
run: npm exec pyright

pyproject.toml

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

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

0 commit comments

Comments
 (0)