Skip to content

Commit 36ef69a

Browse files
Check all python files in project with pyright (#451)
1 parent 12ee098 commit 36ef69a

9 files changed

Lines changed: 26 additions & 8 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ jobs:
8181
directory: .
8282
task: check:prettier
8383

84+
check-pyright-repo:
85+
needs: mise-cache-ubuntu
86+
uses: ./.github/workflows/mise-task.yaml
87+
with:
88+
directory: .
89+
task: check:pyright-repo
90+
8491
check-ruff:
8592
needs: mise-cache-ubuntu
8693
uses: ./.github/workflows/mise-task.yaml
@@ -172,6 +179,7 @@ jobs:
172179
if: always()
173180
needs:
174181
- check-prettier
182+
- check-pyright-repo
175183
- check-ruff
176184
- check-ruff-format
177185
- check-shellcheck

aoc-main/mise.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[tools]
2-
"npm:pyright" = "1.1.408"
32
"pipx:mypy" = "1.19.1"
43

54
[tasks.check]

aoc-main/pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ build-backend = "uv_build"
2222
[tool.mypy]
2323
strict_optional = true
2424

25-
[tool.pyright]
26-
typeCheckingMode = "strict"
27-
2825
[tool.pytest]
2926
addopts = [
3027
"--import-mode=importlib",

aoc-main/pyrightconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"include": ["**"],
3+
"typeCheckingMode": "strict"
4+
}

mise.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python = "3.14.3"
44
uv = "0.10.7"
55

66
# Common tools
7+
"npm:pyright" = "1.1.408"
78
"pipx:shellcheck-gha" = "0.1.2"
89
prettier = "3.6.2"
910
ruff = "0.15.4"
@@ -68,6 +69,7 @@ shell = "sh -c"
6869
[tasks.check]
6970
depends = [
7071
"check:prettier",
72+
"check:pyright-repo",
7173
"check:ruff",
7274
"check:ruff:format",
7375
"check:shellcheck",
@@ -98,6 +100,9 @@ fi
98100
prettier --ignore-path=.gitignore --ignore-path=.prettierignore "$userIgnoreArg" --check .
99101
"""
100102

103+
[tasks."check:pyright-repo"]
104+
run = "pyright"
105+
101106
[tasks."check:ruff"]
102107
run = "ruff check"
103108

pyrightconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"include": ["**"],
3+
"exclude": ["aoc-main/", "solvers/cpp/cmake-conan/", "solvers/python/"],
4+
"typeCheckingMode": "strict"
5+
}

solvers/python/mise.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[tools]
2-
"npm:pyright" = "1.1.408"
32
"pipx:mypy" = "1.19.1"
43

54
[tasks.check]

solvers/python/pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ build-backend = "uv_build"
1818
[tool.mypy]
1919
strict_optional = true
2020

21-
[tool.pyright]
22-
typeCheckingMode = "strict"
23-
2421
[tool.pytest]
2522
addopts = [
2623
"--import-mode=importlib",

solvers/python/pyrightconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"include": ["**"],
3+
"typeCheckingMode": "strict"
4+
}

0 commit comments

Comments
 (0)