Skip to content

Commit 19ed733

Browse files
Apply ruff/flake8-annotations rule ANN204 (#2258)
ANN204 Missing return type annotation for special method `__init__`
1 parent 265837c commit 19ed733

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/zarr/core/metadata/v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
compressor: numcodecs.abc.Codec | dict[str, JSON] | None = None,
5353
filters: Iterable[numcodecs.abc.Codec | dict[str, JSON]] | None = None,
5454
attributes: dict[str, JSON] | None = None,
55-
):
55+
) -> None:
5656
"""
5757
Metadata for a Zarr version 2 array.
5858
"""

src/zarr/core/metadata/v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def parse_dimension_names(data: object) -> tuple[str | None, ...] | None:
7272

7373

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

src/zarr/store/zip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(
5656
mode: ZipStoreAccessModeLiteral = "r",
5757
compression: int = zipfile.ZIP_STORED,
5858
allowZip64: bool = True,
59-
):
59+
) -> None:
6060
super().__init__(mode=mode)
6161

6262
if isinstance(path, str):

0 commit comments

Comments
 (0)