Skip to content

Commit 4da4958

Browse files
committed
immediatly format the error
1 parent a9d31a9 commit 4da4958

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/zarr/core/metadata/v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def parse_codecs(data: object) -> tuple[Codec, ...]:
6767
try:
6868
out += (get_codec_class(name_parsed).from_dict(c),)
6969
except KeyError as e:
70-
raise UnknownCodecError(e.args[0]) from e
70+
raise UnknownCodecError(f"Unknown codec: {e.args[0]!r}") from e
7171

7272
return out
7373

src/zarr/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class UnknownCodecError(BaseZarrError):
106106
Raised when a unknown codec was used.
107107
"""
108108

109-
_msg = "Unknown codec {!r}."
109+
_msg = "{}"
110110

111111

112112
class NodeTypeValidationError(MetadataValidationError):

0 commit comments

Comments
 (0)