Skip to content

docs: docstring policy pass over modern_di - #280

Merged
lesnik512 merged 1 commit into
mainfrom
docs/docstring-cleanup
Jul 7, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/docstring-cleanup

Conversation

@lesnik512

Copy link
Copy Markdown
Member

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_provider references (functions removed long ago) are gone; the fresh-ArgumentResolutionError rationale is stated once instead of three times.
  • container.py: resolve_provider keeps its contract, loses the RecursionError-conversion narration (lives in architecture/validation.md); _convert_recursion_error, _warn_and_reopen_if_closed, __init__, set_context trimmed to contract + load-bearing constraints.
  • exceptions.py: DependencyPathMixin keeps the slots constraint, loses the reviewer-justification; the # message built dynamically; not templated comment (3×) deleted; per-category filterwarnings recipes 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-ci green (277 passed, 100% coverage), just lint-ci green.

@lesnik512
lesnik512 merged commit 6d0d3c6 into main Jul 7, 2026
7 checks passed
@lesnik512
lesnik512 deleted the docs/docstring-cleanup branch July 7, 2026 08:02
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