File tree 3 files changed +44
-0
lines changed
3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : " Optional mypy check"
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " pull-request/[0-9]+"
7
+ - " main"
8
+ required : false
9
+
10
+ jobs :
11
+ mypy :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Checkout ${{ github.event.repository.name }}
16
+ uses : actions/checkout@v4
17
+ with :
18
+ fetch-depth : 0
19
+
20
+ # WAR: setup-python is not relocatable...
21
+ # see https://github.com/actions/setup-python/issues/871
22
+ - name : Set up Python ${{ matrix.python-version }}
23
+ if : ${{ startsWith(matrix.host-platform, 'linux') }}
24
+ id : setup-python
25
+ uses : actions/setup-python@v5
26
+ with :
27
+ python-version : " 3.12"
28
+
29
+ - name : Install dependencies
30
+ run : |
31
+ cd cuda_core
32
+ python -m pip install --upgrade pip
33
+ pip install -e .
34
+ pip install mypy
35
+
36
+ - name : Run Mypy
37
+ run : |
38
+ mypy --no-namespace-packages . || true
Original file line number Diff line number Diff line change @@ -109,3 +109,9 @@ exclude = ["cuda/bindings/_version.py"]
109
109
" UP022" ,
110
110
" E402" , # module level import not at top of file
111
111
" F841" ] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example)
112
+
113
+
114
+ [[tool .mypy .overrides ]]
115
+ module = [" Cython" , " llvmlite" ]
116
+ ignore_missing_imports = true
117
+ follow_imports = " skip"
You can’t perform that action at this time.
0 commit comments