Skip to content

Enable and apply ruff rule RUF009 #1941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ extend-select = [
ignore = [
"RUF003",
"RUF005",
"RUF009",
"RUF012",
"RUF015",
]
Expand Down
4 changes: 2 additions & 2 deletions src/zarr/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections.abc import Iterable
from dataclasses import dataclass, field, replace
from enum import Enum
from typing import TYPE_CHECKING, Any, cast
from typing import TYPE_CHECKING, Any

import numpy as np
import numpy.typing as npt
Expand Down Expand Up @@ -310,7 +310,7 @@ class ArrayV2Metadata(ArrayMetadata):
filters: list[dict[str, JSON]] | None = None
dimension_separator: Literal[".", "/"] = "."
compressor: dict[str, JSON] | None = None
attributes: dict[str, JSON] = cast(dict[str, JSON], field(default_factory=dict))
attributes: dict[str, JSON] = field(default_factory=dict)
zarr_format: Literal[2] = field(init=False, default=2)

def __init__(
Expand Down