Skip to content

fix: handle empty children in box_dots setitem#318

Open
santhreal wants to merge 1 commit into
cdgriffith:masterfrom
santhreal:fix/box-dots-empty-children
Open

fix: handle empty children in box_dots setitem#318
santhreal wants to merge 1 commit into
cdgriffith:masterfrom
santhreal:fix/box-dots-empty-children

Conversation

@santhreal

@santhreal santhreal commented Jul 18, 2026

Copy link
Copy Markdown

Box.setitem (box_dots) hits IndexError when trailing/empty dotted path children[0] with default_box. This PR fixes the regression with a focused test covering the case.

box_dots paths that end with a trailing dot leave an empty children
segment; children[0] then raised IndexError while creating the
intermediate container. Use children[:1] so empty children create a Box
and set the empty-string key, matching existing parent paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant