Skip to content

Commit a3da15e

Browse files
hh-space-invaderjoein
authored andcommitted
new: Add mypy type checker
1 parent 4599b93 commit a3da15e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/type-checkers.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: type-checkers
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
12+
os: [ubuntu-latest]
13+
14+
name: Python ${{ matrix.python-version }} test
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip poetry
27+
poetry install
28+
poetry run pip install "numpy<2.0.0" # https://github.com/python/mypy/issues/17396
29+
30+
- name: mypy
31+
run: |
32+
poetry run mypy fastembed --disallow-incomplete-defs --disallow-untyped-defs --ignore-missing-imports --disable-error-code=import-untyped --disable-error-code=attr-defined --exclude=tokenizer
33+
34+
- name: pyright
35+
run: |
36+
poetry run pyright tests/type_stub.py

0 commit comments

Comments
 (0)