File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : type checking
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ paths :
9
+ - yt_experiments/**/*.py
10
+ - pyproject.toml
11
+ - .github/workflows/type-checking.yaml
12
+ workflow_dispatch :
13
+
14
+ jobs :
15
+ build :
16
+ runs-on : ubuntu-latest
17
+ name : type check
18
+ timeout-minutes : 60
19
+
20
+ concurrency :
21
+ # auto-cancel any in-progress job *on the same branch*
22
+ group : ${{ github.workflow }}-${{ github.ref }}
23
+ cancel-in-progress : true
24
+
25
+ steps :
26
+ - name : Checkout repo
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Set up Python
30
+ uses : actions/setup-python@v5
31
+ with :
32
+ # run with oldest supported python version
33
+ # so that we always get compatible versions of
34
+ # core dependencies at type-check time
35
+ python-version : ' 3.10'
36
+
37
+ - name : Build
38
+ run : |
39
+ python3 -m pip install --upgrade pip
40
+ python3 -m pip install "mypy==1.11.2"
41
+
42
+ - run : python -m pip list
43
+
44
+ - name : Run mypy
45
+ run : mypy yt_experiments
Original file line number Diff line number Diff line change @@ -106,3 +106,14 @@ archs = "auto"
106
106
107
107
[tool .cibuildwheel .windows ]
108
108
archs = " auto64"
109
+
110
+ [tool .mypy ]
111
+ files = [" yt_experiments" ,]
112
+ python_version = " 3.10"
113
+ warn_unused_configs = true
114
+ strict = true
115
+ enable_error_code = [" ignore-without-code" , " redundant-expr" , " truthy-bool" ]
116
+ warn_unreachable = true
117
+ disallow_untyped_defs = false
118
+ disallow_incomplete_defs = false
119
+ disable_error_code = [" import-untyped" , " import-not-found" ]
You can’t perform that action at this time.
0 commit comments