Skip to content

Commit 6d0acef

Browse files
committed
add: pyright
1 parent 84c6243 commit 6d0acef

3 files changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/pyright.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Type check with pyright
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "**/*.py"
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- "**/*.py"
14+
15+
jobs:
16+
typecheck:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 1
23+
24+
- name: Set up python
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version-file: "pyproject.toml"
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
31+
32+
- name: Install the project
33+
run: uv sync --frozen --group dev
34+
35+
- name: Run pyright
36+
run: uv run pyright

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ prod = [
1818
lint = [
1919
"ruff==0.14.8",
2020
]
21+
type = [
22+
"pyright==1.1.407",
23+
]
24+
test = [
25+
"faker==38.2.0",
26+
"httpx==0.28.1",
27+
"pytest==9.0.2",
28+
"pytest-cov==7.0.0",
29+
]
30+
dev = [
31+
{include-group = "type"},
32+
{include-group = "test"}
33+
]
2134

2235
[tool.uv]
2336
default-groups = ["prod"]

pyrightconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"include": [
3+
"app",
4+
"tests"
5+
],
6+
"typeCheckingMode": "standard",
7+
"pythonVersion": "3.14"
8+
}

0 commit comments

Comments
 (0)