Skip to content

Commit

Permalink
Apply ruff/flake8-annotations rule ANN204
Browse files Browse the repository at this point in the history
ANN204 Missing return type annotation for special method `__init__`
  • Loading branch information
DimitriPapadopoulos committed Sep 26, 2024
1 parent e968ac5 commit 56d116d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/zarr/core/metadata/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
compressor: numcodecs.abc.Codec | dict[str, JSON] | None = None,
filters: Iterable[numcodecs.abc.Codec | dict[str, JSON]] | None = None,
attributes: dict[str, JSON] | None = None,
):
) -> None:
"""
Metadata for a Zarr version 2 array.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/metadata/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def parse_dimension_names(data: object) -> tuple[str | None, ...] | None:


class V3JsonEncoder(json.JSONEncoder):
def __init__(self, *args: Any, **kwargs: Any):
def __init__(self, *args: Any, **kwargs: Any) -> None:
self.indent = kwargs.pop("indent", config.get("json_indent"))
super().__init__(*args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion src/zarr/store/zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
mode: ZipStoreAccessModeLiteral = "r",
compression: int = zipfile.ZIP_STORED,
allowZip64: bool = True,
):
) -> None:
super().__init__(mode=mode)

if isinstance(path, str):
Expand Down

0 comments on commit 56d116d

Please sign in to comment.