Skip to content

Replace existing contents when reinitializing BoxList - #376

Open
GreedyC wants to merge 1 commit into
cdgriffith:developfrom
GreedyC:codex/reinitialize-boxlist
Open

GreedyC wants to merge 1 commit into
cdgriffith:developfrom
GreedyC:codex/reinitialize-boxlist

Conversation

@GreedyC

@GreedyC GreedyC commented Nov 30, 2026

Copy link
Copy Markdown

Calling BoxList.init on an existing instance appends to its old contents. Initializing from the same instance can keep extending the list being consumed. Replace the old contents as list.init does, materializing input before clearing a nonempty instance. Nested values still become Box objects.

Closes #375.

The replacement regression fails on develop before the fix. Tests cover replacement, clearing and self input. All 1,227 tests pass (one skipped), using the development TOML writer dependency. Ruff checks and format checks pass for the changed Python files.

Prepared with Codex assistance. This was found by source inspection, without a claim of production usage.

This branch has not been deployed

No deployments
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