Skip to content

Commit 83833bd

Browse files
committed
Casefold metadata key before sorting
1 parent fa0f30f commit 83833bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/zarr/core/group.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ def to_dict(self) -> dict[str, JSON]:
146146
k: v.to_dict()
147147
for k, v in sorted(
148148
self.flattened_metadata.items(),
149-
key=lambda item: (item[0].count("/"), unicodedata.normalize("NFKC", item[0])),
149+
key=lambda item: (
150+
item[0].count("/"),
151+
unicodedata.normalize("NFKC", item[0]).casefold(),
152+
),
150153
)
151154
},
152155
}

0 commit comments

Comments
 (0)