Skip to content

docs: complete RST → Google-style docstring sweep #1336

Closed

Description

@planetf1

Context

PR #1244 converted the majority of block-level RST directives in docstrings to Google-style, but the sweep is incomplete. A future contributor scanning the codebase should not assume the job is done.

Known remaining structural directives

These files still contain Example::, .. note::, or .. code-block:: patterns that should be converted:

File Line Pattern
mellea/formatters/template_formatter.py 45 Example::
mellea/stdlib/streaming.py 312 .. code-block:: python
mellea/telemetry/context.py 8, 167 Example::
mellea/backends/adapters/_core.py 13 .. note::
mellea/backends/adapters/capabilities.py 12 .. note::

Broader scan needed

A more thorough grep should be run across the full codebase before closing this issue. Inline RST cross-reference roles (:func:, :class:, :meth:) were not converted in PR #1244 and likely number in the hundreds. Whether converting them is in scope should be decided before starting work — they render as plain text in Google-style contexts, so they are low priority but still non-conformant with the convention documented in AGENTS.md.

Suggested scan:

# Block-level structural directives
grep -rn "Example::\|\.\. note::\|\.\. deprecated::\|\.\. code-block::" mellea/ --include="*.py"

# Inline cross-reference roles
grep -rn ":func:\`\|:class:\`\|:meth:\`\|:attr:\`\|:param \|:type \|:rtype:\|:returns:\|:return:" mellea/ --include="*.py"

Convention reference

See AGENTS.md § 5 and CONTRIBUTING.md § "Code examples in docstrings" for the target style.

Activity

  1. planetf1 commented on Jun 24, 2026

    @planetf1
    ContributorAuthor

    Additional instances found in PR #1311 post-merge review

    mellea/stdlib/components/docs/richdocument.py — two items to clean up:

    1. RST named-reference anchor (new pattern) — the class docstring introduced a .. _Docling-supported format: https://ds4sd.github.io/docling/ target and a trailing-underscore `Docling-supported format`_ reference. This is the only .. _ anchor definition in the codebase and will render as literal text in the Griffe/Docusaurus pipeline. Should be replaced with a plain Markdown inline link.

    2. Duplicate Raises: in __init__ — Raises: TypeError is documented in both the class docstring (correct per AGENTS.md §5) and the __init__ docstring (which per convention should carry only a single summary sentence). The __init__ block should be dropped.

    Neither item blocked CI (RST validator is warning-only; docstring quality gate only checks for the presence of a Raises: entry, not duplication).

  2. added
    documentation
    on Jun 24, 2026
  3. planetf1 commented on Jun 25, 2026

    @planetf1
    ContributorAuthor

    mellea/stdlib/components/intrinsic/ — now clean

    guardian.py and _util.py were using :class:, :func:, :meth:, :data: cross-reference roles and double-backtick x literals. Fixed in PR #1323 (commit c2c40f9) — the whole intrinsic/ package now uses consistent Google-style single-backtick identifiers.

  4. mvanhorn commented on Jul 15, 2026

    @mvanhorn
    Contributor

    Opened a PR with a fix: #1397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions