Skip to content

chore: pass explicit validate= to root Container in tests and README#22

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#22
lesnik512 merged 1 commit into
mainfrom
chore/explicit-validate

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • Add explicit validate=True to the two bare root modern_di.Container(...) constructions in this repo: tests/conftest.py and the README usage example.
  • 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. Both graphs here are valid, so validate=True was used at both sites (no validate=False exceptions needed).

Test plan

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

🤖 Generated with Claude Code

Future-proofs against the upcoming UnvalidatedContainerWarning in
modern-di 2.x (raised when a root container omits validate) and
dogfoods graph validation in the fixture and README example.

Co-Authored-By: Claude Fable 5 <[email protected]>
@lesnik512 lesnik512 merged commit 95bc2d2 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