diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 791efd5..6f6b6a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,6 +40,9 @@ jobs: - name: "Install python dependencies" run: | pip install ".[dev,ci]" + - name: "Run type checking" + run: | + mypy python test.py --disable-error-code import - name: "Run tests" run: | coverage run -m unittest -v diff --git a/pyproject.toml b/pyproject.toml index 3b514cc..ea15bd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,11 +25,13 @@ dependencies = [ [project.optional-dependencies] dev = [ "coverage>=6.2", + "mypy>=1.4.1", "pytest>=6.2.5", "pytest-cov>=3.0.0", "trio>=0.19.0", ] ci = [ + "mypy==1.4.1", "pycryptodome==3.10.1", "stream-inflate==0.0.12", ] diff --git a/python/stream_unzip/__init__.py b/python/stream_unzip/__init__.py index 0a0b378..7e97885 100644 --- a/python/stream_unzip/__init__.py +++ b/python/stream_unzip/__init__.py @@ -539,7 +539,7 @@ def to_sync_iterable(async_iterable): loop = None if loop is None: - import trio + import trio # type: ignore [no-redef, assignment] unzipped_chunks = stream_unzip( zipfile_chunks=to_sync_iterable(chunks),