@@ -1354,7 +1354,7 @@ async def test_chunk_encoding_wrong_type(
1354
1354
dtype = "uint8" ,
1355
1355
shape = (10 ,),
1356
1356
zarr_format = 3 ,
1357
- ** {argument_key : codec },
1357
+ ** {argument_key : codec }, # type: ignore[arg-type]
1358
1358
)
1359
1359
1360
1360
@staticmethod
@@ -1375,7 +1375,10 @@ async def test_chunk_encoding_wrong_type(
1375
1375
async def test_chunk_encoding_missing_arguments (
1376
1376
store : MemoryStore ,
1377
1377
argument_key : str ,
1378
- codec : str | tuple [FiltersLike | SerializerLike | CompressorsLike ],
1378
+ codec : FiltersLike
1379
+ | SerializerLike
1380
+ | CompressorsLike
1381
+ | tuple [FiltersLike | SerializerLike | CompressorsLike ],
1379
1382
codec_cls_name : str ,
1380
1383
zarr_format : ZarrFormat ,
1381
1384
) -> None :
@@ -1392,15 +1395,15 @@ class MockCompressorRequiresConfig3(BytesBytesCodec):
1392
1395
def compute_encoded_size (
1393
1396
self , input_byte_length : int , chunk_spec : ArraySpec
1394
1397
) -> int :
1395
- pass
1398
+ return 0
1396
1399
1397
1400
def __init__ (self , * , argument : str ) -> None :
1398
1401
super ().__init__ ()
1399
1402
1400
1403
register_codec ("mock_compressor_v3" , MockCompressorRequiresConfig3 )
1401
1404
elif "mock_compressor_v2" in codec :
1402
-
1403
- class MockCompressorRequiresConfig2 (numcodecs .abc .Codec ):
1405
+ # ignore mypy error because numcodecs is not typed
1406
+ class MockCompressorRequiresConfig2 (numcodecs .abc .Codec ): # type: ignore[misc]
1404
1407
def __init__ (self , * , argument : str ) -> None :
1405
1408
super ().__init__ ()
1406
1409
@@ -1421,7 +1424,7 @@ def decode(self, buf: Any, out=None) -> Any: # type: ignore[no-untyped-def]
1421
1424
dtype = "uint8" ,
1422
1425
shape = (10 ,),
1423
1426
zarr_format = zarr_format ,
1424
- ** {argument_key : codec },
1427
+ ** {argument_key : codec }, # type: ignore[arg-type]
1425
1428
)
1426
1429
1427
1430
@staticmethod
0 commit comments