Skip to content

Commit b8b52ef

Browse files
Apply ruff rule RUF022
RUF022 `__all__` is not sorted This future rule is triggered in preview mode.
1 parent eeefe41 commit b8b52ef

File tree

13 files changed

+56
-56
lines changed

13 files changed

+56
-56
lines changed

src/zarr/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@
3434
assert not __version__.startswith("0.0.0")
3535

3636
__all__ = [
37-
"__version__",
38-
"config",
3937
"Array",
4038
"AsyncArray",
41-
"Group",
4239
"AsyncGroup",
43-
"tree",
40+
"Group",
41+
"__version__",
4442
"array",
43+
"config",
4544
"consolidate_metadata",
4645
"copy",
4746
"copy_all",
@@ -63,6 +62,7 @@
6362
"save",
6463
"save_array",
6564
"save_group",
65+
"tree",
6666
"zeros",
6767
"zeros_like",
6868
]

src/zarr/abc/codec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
from zarr.core.indexing import SelectorTuple
2121

2222
__all__ = [
23-
"CodecInput",
24-
"CodecOutput",
2523
"ArrayArrayCodec",
2624
"ArrayBytesCodec",
27-
"BytesBytesCodec",
2825
"ArrayBytesCodecPartialDecodeMixin",
2926
"ArrayBytesCodecPartialEncodeMixin",
27+
"BytesBytesCodec",
28+
"CodecInput",
29+
"CodecOutput",
3030
"CodecPipeline",
3131
]
3232

src/zarr/abc/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from zarr.core.buffer import Buffer, BufferPrototype
1010
from zarr.core.common import AccessModeLiteral, BytesLike
1111

12-
__all__ = ["Store", "AccessMode", "ByteGetter", "ByteSetter", "set_or_delete"]
12+
__all__ = ["AccessMode", "ByteGetter", "ByteSetter", "Store", "set_or_delete"]
1313

1414

1515
class AccessMode(NamedTuple):

src/zarr/api/asynchronous.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,29 @@
3030
PathLike = str
3131

3232
__all__ = [
33+
"array",
3334
"consolidate_metadata",
3435
"copy",
3536
"copy_all",
3637
"copy_store",
37-
"load",
38-
"open",
39-
"open_consolidated",
40-
"save",
41-
"save_array",
42-
"save_group",
43-
"tree",
44-
"array",
45-
"group",
46-
"open_group",
4738
"create",
4839
"empty",
4940
"empty_like",
5041
"full",
5142
"full_like",
43+
"group",
44+
"load",
5245
"ones",
5346
"ones_like",
47+
"open",
5448
"open_array",
49+
"open_consolidated",
50+
"open_group",
5551
"open_like",
52+
"save",
53+
"save_array",
54+
"save_group",
55+
"tree",
5656
"zeros",
5757
"zeros_like",
5858
]

src/zarr/api/synchronous.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@
1414
from zarr.store import StoreLike
1515

1616
__all__ = [
17+
"array",
1718
"consolidate_metadata",
1819
"copy",
1920
"copy_all",
2021
"copy_store",
21-
"load",
22-
"open",
23-
"open_consolidated",
24-
"save",
25-
"save_array",
26-
"save_group",
27-
"tree",
28-
"array",
29-
"group",
30-
"open_group",
3122
"create",
3223
"empty",
3324
"empty_like",
3425
"full",
3526
"full_like",
27+
"group",
28+
"load",
3629
"ones",
3730
"ones_like",
31+
"open",
3832
"open_array",
33+
"open_consolidated",
34+
"open_group",
3935
"open_like",
36+
"save",
37+
"save_array",
38+
"save_group",
39+
"tree",
4040
"zeros",
4141
"zeros_like",
4242
]

src/zarr/convenience.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
)
1616

1717
__all__ = [
18+
"consolidate_metadata",
19+
"copy",
20+
"copy_all",
21+
"copy_store",
22+
"load",
1823
"open",
24+
"open_consolidated",
1925
"save",
20-
"load",
2126
"save_array",
2227
"save_group",
23-
"copy",
24-
"copy_all",
25-
"copy_store",
2628
"tree",
27-
"consolidate_metadata",
28-
"open_consolidated",
2929
]
3030

3131
warnings.warn(

src/zarr/core/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
from zarr.core.metadata.common import ArrayMetadata
7474

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

7878

7979
def parse_array_metadata(data: Any) -> ArrayV2Metadata | ArrayV3Metadata:

src/zarr/core/buffer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
__all__ = [
1212
"ArrayLike",
1313
"Buffer",
14+
"BufferPrototype",
1415
"NDArrayLike",
1516
"NDBuffer",
16-
"BufferPrototype",
1717
"default_buffer_prototype",
1818
"numpy_buffer_prototype",
1919
]

src/zarr/creation.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
)
1717

1818
__all__ = [
19+
"array",
1920
"create",
2021
"empty",
21-
"zeros",
22-
"ones",
23-
"full",
24-
"array",
25-
"open_array",
2622
"empty_like",
27-
"zeros_like",
28-
"ones_like",
23+
"full",
2924
"full_like",
25+
"ones",
26+
"ones_like",
27+
"open_array",
3028
"open_like",
29+
"zeros",
30+
"zeros_like",
3131
]
3232

3333
warnings.warn(

src/zarr/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ContainsArrayAndGroupError(_BaseZarrError):
2626

2727

2828
__all__ = [
29-
"ContainsGroupError",
30-
"ContainsArrayError",
3129
"ContainsArrayAndGroupError",
30+
"ContainsArrayError",
31+
"ContainsGroupError",
3232
]

src/zarr/registry.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
__all__ = [
1717
"Registry",
18-
"register_codec",
19-
"register_pipeline",
20-
"register_buffer",
21-
"register_ndbuffer",
22-
"get_codec_class",
23-
"get_pipeline_class",
2418
"get_buffer_class",
19+
"get_codec_class",
2520
"get_ndbuffer_class",
21+
"get_pipeline_class",
22+
"register_buffer",
23+
"register_codec",
24+
"register_ndbuffer",
25+
"register_pipeline",
2626
]
2727

2828
T = TypeVar("T")

src/zarr/store/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from zarr.store.zip import ZipStore
66

77
__all__ = [
8-
"StorePath",
9-
"StoreLike",
10-
"make_store_path",
11-
"RemoteStore",
128
"LocalStore",
139
"MemoryStore",
10+
"RemoteStore",
11+
"StoreLike",
12+
"StorePath",
1413
"ZipStore",
14+
"make_store_path",
1515
]

src/zarr/testing/buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717

1818
__all__ = [
19-
"TestBuffer",
2019
"NDBufferUsingTestNDArrayLike",
2120
"StoreExpectingTestBuffer",
21+
"TestBuffer",
2222
]
2323

2424

0 commit comments

Comments
 (0)