Skip to content

chore: pass explicit validate= to root Container() in tests and README#29

Merged
lesnik512 merged 1 commit into
mainfrom
chore/explicit-validate
Jul 6, 2026
Merged

chore: pass explicit validate= to root Container() in tests and README#29
lesnik512 merged 1 commit into
mainfrom
chore/explicit-validate

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Passes an explicit validate= to every bare root modern_di.Container(...) construction in this repo's tests and README.md (5 test sites + 1 README example). build_child_container calls are untouched — only root constructions accept validate.

All sites use validate=True; none of the graphs here are intentionally invalid, so no validate=False exceptions were needed.

Why

The next modern-di 2.x minor introduces UnvalidatedContainerWarning (a FutureWarning) when a root container is built without an explicit validate argument. Passing it explicitly future-proofs the suite and README against warning noise and dogfoods graph validation. The warning isn't asserted here since the currently pinned modern-di release doesn't emit it yet.

Test plan

  • just test-ci — 14 passed, 100% coverage
  • just lint-ci — ruff format/check, ty, planning index all pass

🤖 Generated with Claude Code

The upcoming modern-di 2.x minor emits an UnvalidatedContainerWarning
(FutureWarning) when a root container is built without an explicit
validate argument. Passing validate=True everywhere future-proofs the
suite and README against that warning noise and dogfoods graph
validation ahead of time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lesnik512
lesnik512 merged commit 377364b into main Jul 6, 2026
6 checks passed
@lesnik512
lesnik512 deleted the chore/explicit-validate branch July 6, 2026 08:34
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