Skip to content

Commit f7bbd68

Browse files
committed
Add mypy.stubtest to CI
1 parent a7b9855 commit f7bbd68

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
# Many color libraries just need this to be set to any value, but at least
1616
# one distinguishes color depth, where "3" -> "256-bit color".
1717
FORCE_COLOR: 3
18+
MYPYPATH: ${CI_PROJECT_DIR}/stubs
1819

1920
jobs:
2021
lint:
@@ -69,4 +70,8 @@ jobs:
6970
7071
- name: Generate docstub stubs
7172
run: |
72-
python -m docstub -v src/docstub
73+
python -m docstub -v src/docstub -o ${MYPYPATH}/docstub
74+
75+
- name: Check docstub stubs with mypy
76+
run: |
77+
python -m mypy.stubtest docstub

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ dev = [
4545
test = [
4646
"pytest >=5.0.0",
4747
"pytest-cov >= 5.0.0",
48+
"mypy",
4849
]
4950

5051
[project.urls]
@@ -80,6 +81,7 @@ extend-select = [
8081
"UP", # pyupgrade
8182
"YTT", # flake8-2020
8283
"EXE", # flake8-executable
84+
# "PYI", # flake8-pyi
8385
]
8486
ignore = [
8587
"PLR09", # Too many <...>

0 commit comments

Comments
 (0)