Skip to content

Commit c7e4676

Browse files
committed
add changelog
1 parent b3d5659 commit c7e4676

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/zarr/codecs/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from zarr.codecs.blosc import BloscCname, BloscCname_lit, BloscCodec, BloscShuffle, BloscShuffle_lit
3+
from zarr.codecs.blosc import BloscCname, BloscCname_Lit, BloscCodec, BloscShuffle, BloscShuffle_Lit
44
from zarr.codecs.bytes import BytesCodec, Endian
55
from zarr.codecs.crc32c_ import Crc32cCodec
66
from zarr.codecs.gzip import GzipCodec
@@ -31,10 +31,10 @@
3131

3232
__all__ = [
3333
"BloscCname",
34-
"BloscCname_lit",
34+
"BloscCname_Lit",
3535
"BloscCodec",
3636
"BloscShuffle",
37-
"BloscShuffle_lit",
37+
"BloscShuffle_Lit",
3838
"BytesCodec",
3939
"Crc32cCodec",
4040
"Endian",

src/zarr/codecs/blosc.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,28 +67,28 @@ class BloscCname(Enum):
6767

6868

6969
# TODO: Rename this when we retire the enums
70-
BloscShuffle_lit = Literal["noshuffle", "shuffle", "bitshuffle"]
70+
BloscShuffle_Lit = Literal["noshuffle", "shuffle", "bitshuffle"]
7171
"""The names of the shuffle options used by the blosc codec."""
7272
BLOSC_SHUFFLE: Final = ("noshuffle", "shuffle", "bitshuffle")
7373

7474
# TODO: rename this when we retire the enums
75-
BloscCname_lit = Literal["lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib"]
75+
BloscCname_Lit = Literal["lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib"]
7676
"""The names of the compression libraries used by the blosc codec"""
7777
BLOSC_CNAME: Final = ("lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib")
7878

7979

8080
class BloscConfigV2(TypedDict):
81-
cname: BloscCname_lit
81+
cname: BloscCname_Lit
8282
clevel: int
8383
shuffle: int
8484
blocksize: int
8585
typesize: NotRequired[int]
8686

8787

8888
class BloscConfigV3(TypedDict):
89-
cname: BloscCname_lit
89+
cname: BloscCname_Lit
9090
clevel: int
91-
shuffle: BloscShuffle_lit
91+
shuffle: BloscShuffle_Lit
9292
blocksize: int
9393
typesize: int
9494

@@ -187,9 +187,9 @@ def __init__(
187187
self,
188188
*,
189189
typesize: int | None = None,
190-
cname: BloscCname_lit | BloscCname = "zstd",
190+
cname: BloscCname_Lit | BloscCname = "zstd",
191191
clevel: int = 5,
192-
shuffle: BloscShuffle_lit | BloscShuffle | None = None,
192+
shuffle: BloscShuffle_Lit | BloscShuffle | None = None,
193193
blocksize: int = 0,
194194
) -> None:
195195
typesize_parsed = parse_typesize(typesize) if typesize is not None else None

tests/test_codecs/test_blosc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from zarr.codecs.blosc import (
1212
BLOSC_CNAME,
1313
BLOSC_SHUFFLE,
14-
BloscCname_lit,
14+
BloscCname_Lit,
1515
BloscJSON_V2,
1616
BloscJSON_V3,
17-
BloscShuffle_lit,
17+
BloscShuffle_Lit,
1818
)
1919
from zarr.core.buffer import default_buffer_prototype
2020
from zarr.storage import StorePath
@@ -26,7 +26,7 @@
2626
@pytest.mark.parametrize("blocksize", [1, 2])
2727
@pytest.mark.parametrize("typesize", [1, 2])
2828
def test_to_json_v2(
29-
cname: BloscCname_lit, shuffle: BloscShuffle_lit, clevel: int, blocksize: int, typesize: int
29+
cname: BloscCname_Lit, shuffle: BloscShuffle_Lit, clevel: int, blocksize: int, typesize: int
3030
) -> None:
3131
codec = BloscCodec(
3232
shuffle=shuffle, cname=cname, clevel=clevel, blocksize=blocksize, typesize=typesize

tests/test_regression/test_v2_dtype_regression.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ArrayParams:
101101
ArrayParams(
102102
values=np.arange(4, dtype="float64"),
103103
fill_value=1,
104-
compressor=BloscCodec(clevel=1, shuffle=shuf, cname=cname),
104+
compressor=BloscCodec(clevel=1, shuffle=shuf, cname=cname), # type: ignore[arg-type]
105105
)
106106
for shuf, cname in itertools.product(BLOSC_SHUFFLE, BLOSC_CNAME)
107107
if cname != "snappy"
@@ -156,7 +156,7 @@ def source_array_v2(tmp_path: Path, request: pytest.FixtureRequest) -> Array:
156156
shape=array_params.values.shape,
157157
dtype=dtype,
158158
chunks=array_params.values.shape,
159-
compressors=compressor,
159+
compressors=compressor, # type: ignore[arg-type]
160160
filters=filters,
161161
fill_value=array_params.fill_value,
162162
order="C",
@@ -203,7 +203,7 @@ def source_array_v3(tmp_path: Path, request: pytest.FixtureRequest) -> Array:
203203
dtype=dtype,
204204
chunks=array_params.values.shape,
205205
compressors=compressor,
206-
filters=array_params.filters,
206+
filters=array_params.filters, # type: ignore[arg-type]
207207
serializer=serializer,
208208
fill_value=array_params.fill_value,
209209
chunk_key_encoding=chunk_key_encoding,

0 commit comments

Comments
 (0)