docs: docstring policy pass over modern_di - #280
Merged
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.
Applies the docstring policy from the 2026-07-06 verbosity benchmark across
modern_di/: public API documents the contract; internal helpers get a one-line contract plus at most 1–2 lines for a genuinely non-obvious constraint; implementation narration and reviewer-justification deleted. The policy is added to CLAUDE.md's Code Style section. Spec:planning/changes/2026-07-07.02-docstring-cleanup.md.Highlights:
wiring.py: 42 docstring lines in a 159-line file trimmed; the stale_compile_kwargs/Factory._find_dep_providerreferences (functions removed long ago) are gone; the fresh-ArgumentResolutionErrorrationale is stated once instead of three times.container.py:resolve_providerkeeps its contract, loses the RecursionError-conversion narration (lives inarchitecture/validation.md);_convert_recursion_error,_warn_and_reopen_if_closed,__init__,set_contexttrimmed to contract + load-bearing constraints.exceptions.py:DependencyPathMixinkeeps the slots constraint, loses the reviewer-justification; the# message built dynamically; not templatedcomment (3×) deleted; per-categoryfilterwarningsrecipes on warning classes kept (public contract).Prose-only diff — no code, message-string, or test changes (review verified stripped ASTs are identical for every changed file), and every deleted rationale was verified to survive in
architecture/or on its owning class.Gates:
just test-cigreen (277 passed, 100% coverage),just lint-cigreen.