Skip to content

Commit db4e73d

Browse files
committed
ci: Add Pyright static type checking workflow
Signed-off-by: KarimAziev <[email protected]>
1 parent bbd730d commit db4e73d

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/pyright.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pyright static type checking
2+
3+
on:
4+
pull_request:
5+
branches: ['*']
6+
workflow_dispatch:
7+
8+
jobs:
9+
type-check:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Install Node.js (needed for Pyright)
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: current
20+
21+
- name: Install Pyright
22+
run: npm install -g pyright
23+
24+
- name: Run Pyright static type checker
25+
run: pyright

pyrightconfig.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"include": ["picamera2"],
3+
"exclude": ["tests"],
4+
"reportMissingImports": false,
5+
"reportMissingTypeStubs": false,
6+
"reportUnknownMemberType": "warning",
7+
"reportOptionalMemberAccess": "warning",
8+
"reportGeneralTypeIssues": "warning",
9+
"reportAttributeAccessIssue": "warning",
10+
"reportUndefinedVariable": "warning",
11+
"reportOptionalOperand": "warning",
12+
"reportAssignmentType": "warning",
13+
"reportInvalidTypeArguments": "warning",
14+
"reportCallIssue": "warning",
15+
"reportOptionalSubscript": "warning",
16+
"reportArgumentType": "warning",
17+
"reportOperatorIssue": "warning",
18+
"reportReturnType": "warning",
19+
"reportOptionalIterable": "warning",
20+
"reportIndexIssue": "warning",
21+
"typeCheckingMode": "basic"
22+
}

0 commit comments

Comments
 (0)