You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the zarr/ 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 running tar 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 running zipinfo -1 dist/zarr-{version}-*-*-*.whl on it.
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 atzarr
's source indicates that it is using type annotations, but because there is nopy.typed
file, mypy will not use the annotations when type-checking code that useszarr
.To resolve this, please do the following:
zarr
are type-annotated and validated by mypy.py.typed
inside thezarr/
package.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.dist/zarr-{version}.tar.gz
file created when building the project) by runningtar ztf dist/zarr-{version}.tar.gz
on it.dist/zarr-{version}-*-*-*.whl
file created when building the project) by runningzipinfo -1 dist/zarr-{version}-*-*-*.whl
on it.Further references:
The text was updated successfully, but these errors were encountered: