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
src/zarr/storage/_object.py:160: error: Argument 1 to "from_bytes" of "Buffer" has incompatible type "Bytes"; expected "bytes | bytearray | memoryview[int]" [arg-type]
The Bytes type in obstore is a CPU byte buffer that is backed by Rust and implements the Python buffer protocol. The type hint for Bytessubclasses from collections.abc.Buffer. BytesLike is defined here:
This change requires some other typing changes, because the numpy type hints (e.g. for from_buffer) do not correctly allow collections.abc.Buffer as an input type.
The text was updated successfully, but these errors were encountered:
In #1661 (comment), there are currently some failing mypy lints of the type
The
Bytes
type inobstore
is a CPU byte buffer that is backed by Rust and implements the Python buffer protocol. The type hint forBytes
subclasses fromcollections.abc.Buffer
.BytesLike
is defined here:zarr-python/src/zarr/core/common.py
Line 34 in f4278a5
and should be updated to be
or, just
because all 3 of those types implement
Buffer
.This change requires some other typing changes, because the numpy type hints (e.g. for
from_buffer
) do not correctly allowcollections.abc.Buffer
as an input type.The text was updated successfully, but these errors were encountered: