docs: correct how modern_di_fixture resolves in the README API section - #37
Merged
Conversation
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.
The README's
## APIsection saidmodern_di_fixtureresolves a type viacontainer.resolveand a Provider viacontainer.resolve_provider. It doesneither:
factory.pycallscontainer.resolve_dependency(dependency), and thetype-or-provider dispatch happens inside modern-di.
Both methods still exist as public methods on
Containerin modern-di 3.4.0, sonothing about the README was broken links or dead API — only the attribution of
which call this package makes. It went stale in 2.1.0, when the inline
isinstancedispatch was replaced byresolve_dependency(
planning/releases/2.1.0.md); the README was not updated alongside it.The replacement names the one call this package makes and stops describing where
modern-di routes it from there.
Non-goals: the
inject/registerwording elsewhere in the README and infactory.pydocstrings is left alone — that belongs to the in-flight vocabularymigration on
docs/migrate-off-planning. This change touches lines that branchdoes not.
Tiny lane: docs-only, no behaviour change, no change file.
AGENTS.mdandarchitecture/already describe the delegation correctly, so the README was theonly stale spot.
Verification:
just lint-ciandjust test-ciboth pass (16 tests, 100%coverage).