Docstring corrections and lint modernization#168
Merged
d-v-b merged 3 commits intoJun 19, 2026
Conversation
Fix docstring rot (v2/v3 examples, codices→codecs, Compare am→an, truncated sentence, invalid to_flat import alias), use V2ChunkKeyEncodingConfig in V2ChunkKeyEncoding, convert list-comp side effects to for loops, drop redundant .copy(), replace single-item membership tests with equality, and fix RUF043 pytest.raises regex patterns. No behavior changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the review in #165. No behavior changes.
Docstring fixes
v3.ArraySpec.from_zarrexample (v3.py): replaced a copy-pasted Zarr v2 repr with a correct Zarr v3 example (verified by running the snippet).to_flatdocstrings (v2.pyandv3.py, method and module-level):to_flat(g1 root_path='baz')→to_flat(g1, root_path='baz').from pydantic_zarr.v{2,3} import flatten→import to_flat.zarr_format=2in a v3 example output.GroupSpec.to_flat) self-consistent by using method-call style (g1.to_flat()).node_type=field in v3, corrected key ordering).v3.pyandexperimental/v3.py.v2.py,v3.py,experimental/v2.py,experimental/v3.py.v2.pymodule-levelto_zarrdocstring: "Additional keyword arguments will be" → "…will be passed to memberto_zarrcalls andzarr.create."V2ChunkKeyEncodingtype (v3.pyline ~120): was usingDefaultChunkKeyEncodingConfig(the wrong config class); changed toV2ChunkKeyEncodingConfigwhich is defined immediately above and is structurally identical — no runtime change.Lint modernization
v3.py,experimental/v3.py):kind in ["f"]/kind in ["c"]→kind == "f"/kind == "c".dict(data).copy()→dict(data)infrom_flat_groupinv2.py,v3.py,experimental/v2.py,experimental/v3.py.ensure_key_no_path(core.py,experimental/core.py): list comprehension used for side effects converted to a plainforloop.tests/): added raw-string prefix orre.escape-style escaping topytest.raises(match=…)patterns that contained regex metacharacters (.and/).🤖 Generated with Claude Code