Closed
Description
Running mypy on code that uses the latest version of zarr
fails with the error message "module is installed, but missing library stubs or py.typed marker". A quick look at zarr
's source indicates that it is using type annotations, but because there is no py.typed
file, mypy will not use the annotations when type-checking code that uses zarr
.
To resolve this, please do the following:
- If not already, ensure that all public items in
zarr
are type-annotated and validated by mypy. - Add an empty file named
py.typed
inside thezarr/
package. - Ensure that the
zarr/py.typed
file is included in sdists & wheels built from the project. This may involve configuration specific to your build backend (setuptools) that is beyond the scope of this comment.- You can list the contents of an sdist (the
dist/zarr-{version}.tar.gz
file created when building the project) by runningtar ztf dist/zarr-{version}.tar.gz
on it. - You can list the contents of a wheel (a
dist/zarr-{version}-*-*-*.whl
file created when building the project) by runningzipinfo -1 dist/zarr-{version}-*-*-*.whl
on it.
- You can list the contents of an sdist (the
Further references:
Metadata
Metadata
Assignees
Type
Projects
Status
Done