Skip to content
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

Apply ruff rule RUF022 #2232

Closed
Closed
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
8 changes: 4 additions & 4 deletions src/zarr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@
assert not __version__.startswith("0.0.0")

__all__ = [
"__version__",
"config",
"Array",
"AsyncArray",
"Group",
"AsyncGroup",
"tree",
"Group",
"__version__",
"array",
"config",
"consolidate_metadata",
"copy",
"copy_all",
Expand All @@ -63,6 +62,7 @@
"save",
"save_array",
"save_group",
"tree",
"zeros",
"zeros_like",
]
6 changes: 3 additions & 3 deletions src/zarr/abc/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
from zarr.core.indexing import SelectorTuple

__all__ = [
"CodecInput",
"CodecOutput",
"ArrayArrayCodec",
"ArrayBytesCodec",
"BytesBytesCodec",
"ArrayBytesCodecPartialDecodeMixin",
"ArrayBytesCodecPartialEncodeMixin",
"BytesBytesCodec",
"CodecInput",
"CodecOutput",
"CodecPipeline",
]

Expand Down
2 changes: 1 addition & 1 deletion src/zarr/abc/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from zarr.core.buffer import Buffer, BufferPrototype
from zarr.core.common import AccessModeLiteral, BytesLike

__all__ = ["Store", "AccessMode", "ByteGetter", "ByteSetter", "set_or_delete"]
__all__ = ["AccessMode", "ByteGetter", "ByteSetter", "Store", "set_or_delete"]


class AccessMode(NamedTuple):
Expand Down
20 changes: 10 additions & 10 deletions src/zarr/api/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@
PathLike = str

__all__ = [
"array",
"consolidate_metadata",
"copy",
"copy_all",
"copy_store",
"load",
"open",
"open_consolidated",
"save",
"save_array",
"save_group",
"tree",
"array",
"group",
"open_group",
"create",
"empty",
"empty_like",
"full",
"full_like",
"group",
"load",
"ones",
"ones_like",
"open",
"open_array",
"open_consolidated",
"open_group",
"open_like",
"save",
"save_array",
"save_group",
"tree",
"zeros",
"zeros_like",
]
Expand Down
20 changes: 10 additions & 10 deletions src/zarr/api/synchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@
from zarr.store import StoreLike

__all__ = [
"array",
"consolidate_metadata",
"copy",
"copy_all",
"copy_store",
"load",
"open",
"open_consolidated",
"save",
"save_array",
"save_group",
"tree",
"array",
"group",
"open_group",
"create",
"empty",
"empty_like",
"full",
"full_like",
"group",
"load",
"ones",
"ones_like",
"open",
"open_array",
"open_consolidated",
"open_group",
"open_like",
"save",
"save_array",
"save_group",
"tree",
"zeros",
"zeros_like",
]
Expand Down
12 changes: 6 additions & 6 deletions src/zarr/convenience.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
)

__all__ = [
"consolidate_metadata",
"copy",
"copy_all",
"copy_store",
"load",
"open",
"open_consolidated",
"save",
"load",
"save_array",
"save_group",
"copy",
"copy_all",
"copy_store",
"tree",
"consolidate_metadata",
"open_consolidated",
]

warnings.warn(
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
from zarr.core.metadata.common import ArrayMetadata

# Array and AsyncArray are defined in the base ``zarr`` namespace
__all__ = ["parse_array_metadata", "create_codec_pipeline"]
__all__ = ["create_codec_pipeline", "parse_array_metadata"]


def parse_array_metadata(data: Any) -> ArrayV2Metadata | ArrayV3Metadata:
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/buffer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
__all__ = [
"ArrayLike",
"Buffer",
"BufferPrototype",
"NDArrayLike",
"NDBuffer",
"BufferPrototype",
"default_buffer_prototype",
"numpy_buffer_prototype",
]
14 changes: 7 additions & 7 deletions src/zarr/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
)

__all__ = [
"array",
"create",
"empty",
"zeros",
"ones",
"full",
"array",
"open_array",
"empty_like",
"zeros_like",
"ones_like",
"full",
"full_like",
"ones",
"ones_like",
"open_array",
"open_like",
"zeros",
"zeros_like",
]

warnings.warn(
Expand Down
4 changes: 2 additions & 2 deletions src/zarr/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ContainsArrayAndGroupError(_BaseZarrError):


__all__ = [
"ContainsGroupError",
"ContainsArrayError",
"ContainsArrayAndGroupError",
"ContainsArrayError",
"ContainsGroupError",
]
12 changes: 6 additions & 6 deletions src/zarr/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

__all__ = [
"Registry",
"register_codec",
"register_pipeline",
"register_buffer",
"register_ndbuffer",
"get_codec_class",
"get_pipeline_class",
"get_buffer_class",
"get_codec_class",
"get_ndbuffer_class",
"get_pipeline_class",
"register_buffer",
"register_codec",
"register_ndbuffer",
"register_pipeline",
]

T = TypeVar("T")
Expand Down
8 changes: 4 additions & 4 deletions src/zarr/store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from zarr.store.zip import ZipStore

__all__ = [
"StorePath",
"StoreLike",
"make_store_path",
"RemoteStore",
"LocalStore",
"MemoryStore",
"RemoteStore",
"StoreLike",
"StorePath",
"ZipStore",
"make_store_path",
]
2 changes: 1 addition & 1 deletion src/zarr/testing/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@


__all__ = [
"TestBuffer",
"NDBufferUsingTestNDArrayLike",
"StoreExpectingTestBuffer",
"TestBuffer",
]


Expand Down