diff --git a/pyproject.toml b/pyproject.toml index 574b09b076..80cb71ff83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -329,4 +329,15 @@ ignore = [ [tool.numpydoc_validation] # See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks -checks = ["GL06", "GL07", "GL10", "PR03", "PR05", "PR06"] +checks = [ + "GL06", + "GL07", + "GL09", + "GL10", + "SS02", + "SS04", + "PR02", + "PR03", + "PR05", + "PR06", +] diff --git a/src/zarr/abc/codec.py b/src/zarr/abc/codec.py index 3548874409..f27152e84c 100644 --- a/src/zarr/abc/codec.py +++ b/src/zarr/abc/codec.py @@ -85,7 +85,7 @@ def evolve_from_array_spec(self, array_spec: ArraySpec) -> Self: Parameters ---------- - chunk_spec : ArraySpec + array_spec : ArraySpec Returns ------- @@ -99,11 +99,11 @@ def validate(self, *, shape: ChunkCoords, dtype: np.dtype[Any], chunk_grid: Chun Parameters ---------- - shape: ChunkCoords + shape : ChunkCoords The array shape - dtype: np.dtype[Any] + dtype : np.dtype[Any] The array data type - chunk_grid: ChunkGrid + chunk_grid : ChunkGrid The array chunk grid """ ... @@ -292,11 +292,11 @@ def validate(self, *, shape: ChunkCoords, dtype: np.dtype[Any], chunk_grid: Chun Parameters ---------- - shape: ChunkCoords + shape : ChunkCoords The array shape - dtype: np.dtype[Any] + dtype : np.dtype[Any] The array data type - chunk_grid: ChunkGrid + chunk_grid : ChunkGrid The array chunk grid """ ... @@ -308,7 +308,7 @@ def compute_encoded_size(self, byte_length: int, array_spec: ArraySpec) -> int: Parameters ---------- - input_byte_length : int + byte_length : int array_spec : ArraySpec Returns @@ -327,7 +327,7 @@ async def decode( Parameters ---------- - chunks_and_specs : Iterable[tuple[Buffer | None, ArraySpec]] + chunk_bytes_and_specs : Iterable[tuple[Buffer | None, ArraySpec]] Ordered set of encoded chunks with their accompanying chunk spec. Returns @@ -346,7 +346,7 @@ async def encode( Parameters ---------- - chunks_and_specs : Iterable[tuple[NDBuffer | None, ArraySpec]] + chunk_arrays_and_specs : Iterable[tuple[NDBuffer | None, ArraySpec]] Ordered set of to-be-encoded chunks with their accompanying chunk spec. Returns diff --git a/src/zarr/abc/store.py b/src/zarr/abc/store.py index 40c8129afe..3e233e8a1d 100644 --- a/src/zarr/abc/store.py +++ b/src/zarr/abc/store.py @@ -162,7 +162,7 @@ def with_mode(self, mode: AccessModeLiteral) -> Self: Parameters ---------- - mode: AccessModeLiteral + mode : AccessModeLiteral The new mode to use. Returns diff --git a/src/zarr/api/asynchronous.py b/src/zarr/api/asynchronous.py index e500562c4c..2c423ff59b 100644 --- a/src/zarr/api/asynchronous.py +++ b/src/zarr/api/asynchronous.py @@ -68,7 +68,7 @@ def _get_shape_chunks(a: ArrayLike | Any) -> tuple[ChunkCoords | None, ChunkCoords | None]: - """helper function to get the shape and chunks from an array-like object""" + """Helper function to get the shape and chunks from an array-like object""" shape = None chunks = None @@ -86,7 +86,7 @@ def _get_shape_chunks(a: ArrayLike | Any) -> tuple[ChunkCoords | None, ChunkCoor def _like_args(a: ArrayLike, kwargs: dict[str, Any]) -> dict[str, Any]: - """set default values for shape and chunks if they are not present in the array-like object""" + """Set default values for shape and chunks if they are not present in the array-like object""" new = kwargs.copy() @@ -121,7 +121,7 @@ def _like_args(a: ArrayLike, kwargs: dict[str, Any]) -> dict[str, Any]: def _handle_zarr_version_or_format( *, zarr_version: ZarrFormat | None, zarr_format: ZarrFormat | None ) -> ZarrFormat | None: - """handle the deprecated zarr_version kwarg and return zarr_format""" + """Handle the deprecated zarr_version kwarg and return zarr_format""" if zarr_format is not None and zarr_version is not None and zarr_format != zarr_version: raise ValueError( f"zarr_format {zarr_format} does not match zarr_version {zarr_version}, please only set one" @@ -135,7 +135,7 @@ def _handle_zarr_version_or_format( def _default_zarr_version() -> ZarrFormat: - """return the default zarr_version""" + """Return the default zarr_version""" return cast(ZarrFormat, int(config.get("default_zarr_version", 3))) @@ -152,9 +152,9 @@ async def consolidate_metadata( Parameters ---------- - store: StoreLike + store : StoreLike The store-like object whose metadata you wish to consolidate. - path: str, optional + path : str, optional A path to a group in the store to consolidate at. Only children below that group will be consolidated. @@ -341,13 +341,13 @@ async def save( ---------- store : Store or str Store or path to directory in file system or name of zip file. - args : ndarray + *args : ndarray NumPy arrays with data to save. zarr_format : {2, 3, None}, optional The zarr format to use when saving. path : str or None, optional The path within the group where the arrays will be saved. - kwargs + **kwargs NumPy arrays with data to save. """ zarr_format = _handle_zarr_version_or_format(zarr_version=zarr_version, zarr_format=zarr_format) @@ -386,7 +386,7 @@ async def save_array( storage_options : dict If using an fsspec URL to create the store, these will be passed to the backend implementation. Ignored otherwise. - kwargs + **kwargs Passed through to :func:`create`, e.g., compressor. """ zarr_format = ( @@ -423,7 +423,7 @@ async def save_group( ---------- store : Store or str Store or path to directory in file system or name of zip file. - args : ndarray + *args : ndarray NumPy arrays with data to save. zarr_format : {2, 3, None}, optional The zarr format to use when saving. @@ -432,7 +432,7 @@ async def save_group( storage_options : dict If using an fsspec URL to create the store, these will be passed to the backend implementation. Ignored otherwise. - kwargs + **kwargs NumPy arrays with data to save. """ zarr_format = ( @@ -479,7 +479,7 @@ async def array( ---------- data : array_like The data to fill the array with. - kwargs + **kwargs Passed through to :func:`create`. Returns diff --git a/src/zarr/core/array.py b/src/zarr/core/array.py index da477056ee..0418d1dc52 100644 --- a/src/zarr/core/array.py +++ b/src/zarr/core/array.py @@ -184,8 +184,6 @@ class AsyncArray(Generic[T_ArrayMetadata]): The metadata of the array. store_path : StorePath The path to the Zarr store. - codec_pipeline : CodecPipeline, optional - The codec pipeline used for encoding and decoding chunks, by default None. order : {'C', 'F'}, optional The order of the array data in memory, by default None. @@ -857,9 +855,9 @@ def _iter_chunk_coords( Parameters ---------- - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The origin of the selection relative to the array's chunk grid. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection in chunk grid coordinates. Yields @@ -878,9 +876,9 @@ def _iter_chunk_keys( Parameters ---------- - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The origin of the selection relative to the array's chunk grid. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection in chunk grid coordinates. Yields @@ -901,9 +899,9 @@ def _iter_chunk_regions( Parameters ---------- - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The origin of the selection relative to the array's chunk grid. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection in chunk grid coordinates. Yields @@ -1151,17 +1149,7 @@ async def info(self) -> None: @dataclass(frozen=True) class Array: - """Instantiate an array from an initialized store. - - Parameters - ---------- - store : StoreLike - The array store that has already been initialized. - shape : ChunkCoords - The shape of the array. - dtype : npt.DTypeLike - The dtype of the array. - """ + """Instantiate an array from an initialized store.""" _async_array: AsyncArray[ArrayV3Metadata] | AsyncArray[ArrayV2Metadata] @@ -1419,9 +1407,9 @@ def _iter_chunk_coords( Parameters ---------- - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The origin of the selection relative to the array's chunk grid. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection in chunk grid coordinates. Yields @@ -1456,9 +1444,9 @@ def _iter_chunk_keys( Parameters ---------- - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The origin of the selection relative to the array's chunk grid. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection in chunk grid coordinates. Yields @@ -1478,9 +1466,9 @@ def _iter_chunk_regions( Parameters ---------- - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The origin of the selection relative to the array's chunk grid. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection in chunk grid coordinates. Yields @@ -2231,7 +2219,7 @@ def get_mask_selection( Parameters ---------- - selection : ndarray, bool + mask : ndarray, bool A Boolean array of the same shape as the array against which the selection is being made. out : NDBuffer, optional @@ -2314,7 +2302,7 @@ def set_mask_selection( Parameters ---------- - selection : ndarray, bool + mask : ndarray, bool A Boolean array of the same shape as the array against which the selection is being made. value : npt.ArrayLike diff --git a/src/zarr/core/buffer/core.py b/src/zarr/core/buffer/core.py index 1fbf58c618..9a07583c93 100644 --- a/src/zarr/core/buffer/core.py +++ b/src/zarr/core/buffer/core.py @@ -308,7 +308,7 @@ class NDBuffer: Parameters ---------- - ndarray_like + array : ndarray_like ndarray-like object that is convertible to a regular Numpy array. """ diff --git a/src/zarr/core/buffer/cpu.py b/src/zarr/core/buffer/cpu.py index 187e2d82dc..5019075496 100644 --- a/src/zarr/core/buffer/cpu.py +++ b/src/zarr/core/buffer/cpu.py @@ -138,7 +138,7 @@ class NDBuffer(core.NDBuffer): Parameters ---------- - ndarray_like + array ndarray-like object that is convertible to a regular Numpy array. """ diff --git a/src/zarr/core/buffer/gpu.py b/src/zarr/core/buffer/gpu.py index d5daba0e9a..6941c8897e 100644 --- a/src/zarr/core/buffer/gpu.py +++ b/src/zarr/core/buffer/gpu.py @@ -132,7 +132,7 @@ class NDBuffer(core.NDBuffer): Parameters ---------- - ndarray_like + array ndarray-like object that is convertible to a regular Numpy array. """ diff --git a/src/zarr/core/chunk_grids.py b/src/zarr/core/chunk_grids.py index 77734056b3..aace45d438 100644 --- a/src/zarr/core/chunk_grids.py +++ b/src/zarr/core/chunk_grids.py @@ -42,15 +42,15 @@ def _guess_chunks( Parameters ---------- - shape: ChunkCoords + shape : ChunkCoords The chunk shape. - typesize: int + typesize : int The size, in bytes, of each element of the chunk. - increment_bytes: int = 256 * 1024 + increment_bytes : int = 256 * 1024 The number of bytes used to increment or decrement the target chunk size in bytes. - min_bytes: int = 128 * 1024 + min_bytes : int = 128 * 1024 The soft lower bound on the final chunk size in bytes. - max_bytes: int = 64 * 1024 * 1024 + max_bytes : int = 64 * 1024 * 1024 The hard upper bound on the final chunk size in bytes. Returns diff --git a/src/zarr/core/group.py b/src/zarr/core/group.py index d797ed7370..ba68213574 100644 --- a/src/zarr/core/group.py +++ b/src/zarr/core/group.py @@ -425,9 +425,9 @@ async def open( Parameters ---------- - store: StoreLike - zarr_format: {2, 3}, optional - use_consolidated: bool or str, default None + store : StoreLike + zarr_format : {2, 3}, optional + use_consolidated : bool or str, default None Whether to use consolidated metadata. By default, consolidated metadata is used if it's present in the @@ -897,32 +897,32 @@ async def create_array( Parameters ---------- - name: str + name : str The name of the array. - shape: tuple[int, ...] + shape : tuple[int, ...] The shape of the array. - dtype: np.DtypeLike = float64 + dtype : np.DtypeLike = float64 The data type of the array. - chunk_shape: tuple[int, ...] | None = None + chunk_shape : tuple[int, ...] | None = None The shape of the chunks of the array. V3 only. - chunk_key_encoding: ChunkKeyEncoding | tuple[Literal["default"], Literal[".", "/"]] | tuple[Literal["v2"], Literal[".", "/"]] | None = None + chunk_key_encoding : ChunkKeyEncoding | tuple[Literal["default"], Literal[".", "/"]] | tuple[Literal["v2"], Literal[".", "/"]] | None = None A specification of how the chunk keys are represented in storage. - codecs: Iterable[Codec | dict[str, JSON]] | None = None + codecs : Iterable[Codec | dict[str, JSON]] | None = None An iterable of Codec or dict serializations thereof. The elements of this collection specify the transformation from array values to stored bytes. - dimension_names: Iterable[str] | None = None + dimension_names : Iterable[str] | None = None The names of the dimensions of the array. V3 only. - chunks: ChunkCoords | None = None + chunks : ChunkCoords | None = None The shape of the chunks of the array. V2 only. - dimension_separator: Literal[".", "/"] | None = None + dimension_separator : Literal[".", "/"] | None = None The delimiter used for the chunk keys. - order: Literal["C", "F"] | None = None + order : Literal["C", "F"] | None = None The memory order of the array. - filters: list[dict[str, JSON]] | None = None + filters : list[dict[str, JSON]] | None = None Filters for the array. - compressor: dict[str, JSON] | None = None + compressor : dict[str, JSON] | None = None The compressor for the array. - exists_ok: bool = False + exists_ok : bool = False If True, a pre-existing array or group at the path of this array will be overwritten. If False, the presence of a pre-existing array or group is an error. @@ -965,7 +965,7 @@ async def create_dataset( ---------- name : str Array name. - kwargs : dict + **kwargs : dict Additional arguments passed to :func:`zarr.AsyncGroup.create_array`. Returns @@ -1368,7 +1368,7 @@ def get(self, path: str, default: DefaultT | None = None) -> Array | Group | Def Parameters ---------- - key : str + path : str Group member name. default : object Default value to return if key is not found (default: None). @@ -1516,8 +1516,6 @@ def require_group(self, name: str, **kwargs: Any) -> Group: ---------- name : str Group name. - overwrite : bool, optional - Overwrite any existing group with given `name` if present. Returns ------- @@ -1567,36 +1565,36 @@ def create_array( Parameters ---------- - name: str + name : str The name of the array. - shape: tuple[int, ...] + shape : tuple[int, ...] The shape of the array. - dtype: np.DtypeLike = float64 + dtype : np.DtypeLike = float64 The data type of the array. - chunk_shape: tuple[int, ...] | None = None + chunk_shape : tuple[int, ...] | None = None The shape of the chunks of the array. V3 only. - chunk_key_encoding: ChunkKeyEncoding | tuple[Literal["default"], Literal[".", "/"]] | tuple[Literal["v2"], Literal[".", "/"]] | None = None + chunk_key_encoding : ChunkKeyEncoding | tuple[Literal["default"], Literal[".", "/"]] | tuple[Literal["v2"], Literal[".", "/"]] | None = None A specification of how the chunk keys are represented in storage. - codecs: Iterable[Codec | dict[str, JSON]] | None = None + codecs : Iterable[Codec | dict[str, JSON]] | None = None An iterable of Codec or dict serializations thereof. The elements of this collection specify the transformation from array values to stored bytes. - dimension_names: Iterable[str] | None = None + dimension_names : Iterable[str] | None = None The names of the dimensions of the array. V3 only. - chunks: ChunkCoords | None = None + chunks : ChunkCoords | None = None The shape of the chunks of the array. V2 only. - dimension_separator: Literal[".", "/"] | None = None + dimension_separator : Literal[".", "/"] | None = None The delimiter used for the chunk keys. - order: Literal["C", "F"] | None = None + order : Literal["C", "F"] | None = None The memory order of the array. - filters: list[dict[str, JSON]] | None = None + filters : list[dict[str, JSON]] | None = None Filters for the array. - compressor: dict[str, JSON] | None = None + compressor : dict[str, JSON] | None = None The compressor for the array. - exists_ok: bool = False + exists_ok : bool = False If True, a pre-existing array or group at the path of this array will be overwritten. If False, the presence of a pre-existing array or group is an error. - data: npt.ArrayLike | None = None + data : npt.ArrayLike | None = None Array data to initialize the array with. Returns @@ -1638,7 +1636,7 @@ def create_dataset(self, name: str, **kwargs: Any) -> Array: ---------- name : str Array name. - kwargs : dict + **kwargs : dict Additional arguments passed to :func:`zarr.Group.create_array` Returns @@ -1663,13 +1661,8 @@ def require_dataset(self, name: str, **kwargs: Any) -> Array: ---------- name : str Array name. - shape : int or tuple of ints - Array shape. - dtype : str or dtype, optional - NumPy dtype. - exact : bool, optional - If True, require `dtype` to match exactly. If false, require - `dtype` can be cast from array dtype. + **kwargs : + See :func:`zarr.Group.create_dataset`. Returns ------- @@ -1690,13 +1683,8 @@ def require_array(self, name: str, **kwargs: Any) -> Array: ---------- name : str Array name. - shape : int or tuple of ints - Array shape. - dtype : str or dtype, optional - NumPy dtype. - exact : bool, optional - If True, require `dtype` to match exactly. If false, require - `dtype` can be cast from array dtype. + **kwargs : + See :func:`zarr.Group.create_array`. Returns ------- @@ -1772,36 +1760,36 @@ def array( Parameters ---------- - name: str + name : str The name of the array. - shape: tuple[int, ...] + shape : tuple[int, ...] The shape of the array. - dtype: np.DtypeLike = float64 + dtype : np.DtypeLike = float64 The data type of the array. - chunk_shape: tuple[int, ...] | None = None + chunk_shape : tuple[int, ...] | None = None The shape of the chunks of the array. V3 only. - chunk_key_encoding: ChunkKeyEncoding | tuple[Literal["default"], Literal[".", "/"]] | tuple[Literal["v2"], Literal[".", "/"]] | None = None + chunk_key_encoding : ChunkKeyEncoding | tuple[Literal["default"], Literal[".", "/"]] | tuple[Literal["v2"], Literal[".", "/"]] | None = None A specification of how the chunk keys are represented in storage. - codecs: Iterable[Codec | dict[str, JSON]] | None = None + codecs : Iterable[Codec | dict[str, JSON]] | None = None An iterable of Codec or dict serializations thereof. The elements of this collection specify the transformation from array values to stored bytes. - dimension_names: Iterable[str] | None = None + dimension_names : Iterable[str] | None = None The names of the dimensions of the array. V3 only. - chunks: ChunkCoords | None = None + chunks : ChunkCoords | None = None The shape of the chunks of the array. V2 only. - dimension_separator: Literal[".", "/"] | None = None + dimension_separator : Literal[".", "/"] | None = None The delimiter used for the chunk keys. - order: Literal["C", "F"] | None = None + order : Literal["C", "F"] | None = None The memory order of the array. - filters: list[dict[str, JSON]] | None = None + filters : list[dict[str, JSON]] | None = None Filters for the array. - compressor: dict[str, JSON] | None = None + compressor : dict[str, JSON] | None = None The compressor for the array. - exists_ok: bool = False + exists_ok : bool = False If True, a pre-existing array or group at the path of this array will be overwritten. If False, the presence of a pre-existing array or group is an error. - data: npt.ArrayLike | None = None + data : npt.ArrayLike | None = None Array data to initialize the array with. Returns diff --git a/src/zarr/core/indexing.py b/src/zarr/core/indexing.py index d2e29b3b55..bffe5270d6 100644 --- a/src/zarr/core/indexing.py +++ b/src/zarr/core/indexing.py @@ -113,13 +113,13 @@ def _iter_grid( Parameters ---------- - grid_shape: Sequence[int] + grid_shape : Sequence[int] The size of the domain to iterate over. - origin: Sequence[int] | None, default=None + origin : Sequence[int] | None, default=None The first coordinate of the domain to return. - selection_shape: Sequence[int] | None, default=None + selection_shape : Sequence[int] | None, default=None The shape of the selection. - order: Literal["lexicographic"], default="lexicographic" + order : Literal["lexicographic"], default="lexicographic" The linear indexing order to use. Returns @@ -310,7 +310,7 @@ def normalize_integer_selection(dim_sel: int, dim_len: int) -> int: class ChunkDimProjection(NamedTuple): """A mapping from chunk to output array for a single dimension. - Parameters + Attributes ---------- dim_chunk_ix Index of chunk. @@ -482,7 +482,7 @@ class ChunkProjection(NamedTuple): chunk array for loading into an output array. Can also be used to extract items from a value array for setting/updating in a chunk array. - Parameters + Attributes ---------- chunk_coords Indices of chunk. diff --git a/src/zarr/core/metadata/v2.py b/src/zarr/core/metadata/v2.py index c5f34d2776..2e18336050 100644 --- a/src/zarr/core/metadata/v2.py +++ b/src/zarr/core/metadata/v2.py @@ -266,12 +266,13 @@ def parse_fill_value(fill_value: object, dtype: np.dtype[Any]) -> Any: Parameters ---------- - fill_value: Any + fill_value : Any A potential fill value. - dtype: np.dtype[Any] + dtype : np.dtype[Any] A numpy dtype. Returns + ------- An instance of `dtype`, or `None`, or any python object (in the case of an object dtype) """ diff --git a/src/zarr/core/metadata/v3.py b/src/zarr/core/metadata/v3.py index 8aedd2b7b6..e9d2f92d8a 100644 --- a/src/zarr/core/metadata/v3.py +++ b/src/zarr/core/metadata/v3.py @@ -423,9 +423,9 @@ def parse_fill_value( Parameters ---------- - fill_value: Any + fill_value : Any A potential fill value. - dtype: str + dtype : str A valid Zarr V3 DataType. Returns diff --git a/src/zarr/storage/common.py b/src/zarr/storage/common.py index b640a7729b..9ed8c274d9 100644 --- a/src/zarr/storage/common.py +++ b/src/zarr/storage/common.py @@ -124,7 +124,7 @@ async def exists(self) -> bool: return await self.store.exists(self.path) def __truediv__(self, other: str) -> StorePath: - """combine this store path with another path""" + """Combine this store path with another path""" return self.__class__(self.store, _dereference_path(self.path, other)) def __str__(self) -> str: @@ -191,7 +191,7 @@ async def make_store_path( ---------- store_like : StoreLike | None The object to convert to a `StorePath` object. - path: str | None, optional + path : str | None, optional The path to use when creating the `StorePath` object. If None, the default path is the empty string. mode : AccessModeLiteral | None, optional @@ -286,9 +286,9 @@ async def ensure_no_existing_node(store_path: StorePath, zarr_format: ZarrFormat Parameters ---------- - store_path: StorePath + store_path : StorePath The storage location to check. - zarr_format: ZarrFormat + zarr_format : ZarrFormat The Zarr format to check. Raises @@ -318,7 +318,7 @@ async def _contains_node_v3(store_path: StorePath) -> Literal["array", "group", Parameters ---------- - store_path: StorePath + store_path : StorePath The location in storage to check. Returns @@ -352,7 +352,7 @@ async def _contains_node_v2(store_path: StorePath) -> Literal["array", "group", Parameters ---------- - store_path: StorePath + store_path : StorePath The location in storage to check. Returns @@ -379,9 +379,9 @@ async def contains_array(store_path: StorePath, zarr_format: ZarrFormat) -> bool Parameters ---------- - store_path: StorePath + store_path : StorePath The StorePath to check for an existing group. - zarr_format: + zarr_format : The zarr format to check for. Returns @@ -415,9 +415,9 @@ async def contains_group(store_path: StorePath, zarr_format: ZarrFormat) -> bool Parameters ---------- - store_path: StorePath + store_path : StorePath The StorePath to check for an existing group. - zarr_format: + zarr_format : The zarr format to check for. Returns diff --git a/src/zarr/storage/logging.py b/src/zarr/storage/logging.py index a29661729f..66fd1687e8 100644 --- a/src/zarr/storage/logging.py +++ b/src/zarr/storage/logging.py @@ -22,16 +22,16 @@ class LoggingStore(Store): Parameters ---------- - store: Store + store : Store Store to wrap - log_level: str + log_level : str Log level - log_handler: logging.Handler + log_handler : logging.Handler Log handler Attributes ---------- - counter: dict + counter : dict Counter of number of times each method has been called """ diff --git a/src/zarr/storage/memory.py b/src/zarr/storage/memory.py index 673c2a75d5..a5e5e28ef8 100644 --- a/src/zarr/storage/memory.py +++ b/src/zarr/storage/memory.py @@ -187,7 +187,7 @@ class GpuMemoryStore(MemoryStore): Parameters ---------- - store_dict: MutableMapping, optional + store_dict : MutableMapping, optional A mutable mapping with string keys and :class:`zarr.core.buffer.gpu.Buffer` values. """ @@ -218,7 +218,7 @@ def from_dict(cls, store_dict: MutableMapping[str, Buffer]) -> Self: Parameters ---------- - store_dict: mapping + store_dict : mapping A mapping of strings keys to arbitrary Buffers. The buffer data will be moved into a :class:`gpu.Buffer`. diff --git a/tests/test_api.py b/tests/test_api.py index 4952254f65..9b7b4f8b9a 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -116,7 +116,7 @@ async def test_open_group(memory_store: MemoryStore) -> None: async def test_open_group_unspecified_version( tmpdir: pathlib.Path, zarr_format: ZarrFormat ) -> None: - """regression test for https://github.com/zarr-developers/zarr-python/issues/2175""" + """Regression test for https://github.com/zarr-developers/zarr-python/issues/2175""" # create a group with specified zarr format (could be 2, 3, or None) _ = await zarr.api.asynchronous.open_group(