Skip to content

Commit c1fc8ea

Browse files
authored
ci: add mypy type checking to CI pipeline (#608)
- Add mypy and types-protobuf to requirements-dev.txt - Add mypy.ini with disable_error_code for import-not-found and import-untyped (AppKit/Foundation/google stubs unavailable) - Add "Run mypy" step to test.yml after pytest
1 parent 63f6a94 commit c1fc8ea

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
working-directory: api/library/python/iterm2
3030
run: python -m pytest tests/ -v
3131

32+
- name: Run mypy
33+
working-directory: api/library/python/iterm2
34+
run: python -m mypy iterm2/
35+
3236
xcode-tests:
3337
runs-on: macos-15
3438

api/library/python/iterm2/mypy.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mypy]
2+
disable_error_code = import-not-found, import-untyped

api/library/python/iterm2/requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
pytest>=7.0.0
33
pytest-cov>=4.0.0
44
pytest-asyncio>=0.21.0
5+
mypy>=1.0.0
6+
types-protobuf

0 commit comments

Comments
 (0)