Skip to content

docs: fix invalid :pyclass: Sphinx role in session docstrings#3367

Closed
Quratulain-bilal wants to merge 3 commits into
openai:mainfrom
Quratulain-bilal:docs/fix-pyclass-sphinx-role-in-session-docstrings
Closed

docs: fix invalid :pyclass: Sphinx role in session docstrings#3367
Quratulain-bilal wants to merge 3 commits into
openai:mainfrom
Quratulain-bilal:docs/fix-pyclass-sphinx-role-in-session-docstrings

Conversation

@Quratulain-bilal
Copy link
Copy Markdown
Contributor

Summary

Four session backend class docstrings use :pyclass:, which is not a valid
Sphinx / mkdocstrings cross-reference role. The canonical form is :class:
(short) or :py:class: (fully qualified). The sibling
src/agents/extensions/memory/__init__.py:5 already uses :class: for the
same target, so this aligns the four backends with the existing convention.

Files changed

  • src/agents/extensions/memory/sqlalchemy_session.py
  • src/agents/extensions/memory/redis_session.py
  • src/agents/extensions/memory/dapr_session.py
  • src/agents/extensions/memory/mongodb_session.py

Why

:pyclass: is a copy-paste typo that propagated across PRs from four
different authors (different dates, per git blame) — each new session
backend was written by copying an existing one. grep confirms zero uses
of :py:class: anywhere in src/, and 1 existing use of :class: for the
exact same target in the sibling __init__.py. So short :class: is the
established convention.

Risk

None — docstring rendering only, no behavior change. ruff check and
ruff format --check pass.

Test plan

  • uv run ruff check src/agents/extensions/memory/ — clean
  • uv run ruff format --check src/agents/extensions/memory/ — clean
  • Confirmed via grep ":pyclass:" src/ that no other occurrences remain
  • Confirmed sibling __init__.py already uses :class: for the same target

`:pyclass:` is not a valid Sphinx / mkdocstrings cross-reference role —
the canonical form is `:class:` (or the fully-qualified `:py:class:`).
Four session backend classes used the typo, which was propagated by
copy-paste across PRs from different authors. The sibling
`extensions/memory/__init__.py` already uses `:class:` for the same
target, so this aligns the four backends with the existing convention.

No behavior change; affects rendered docs only.
@seratch
Copy link
Copy Markdown
Member

seratch commented May 11, 2026

Thanks for suggesting this change. This project's documentation site does not use sphinx, so your changes don't still work well. I've fixed this issue by #3370

@seratch seratch closed this May 11, 2026
@Quratulain-bilal Quratulain-bilal deleted the docs/fix-pyclass-sphinx-role-in-session-docstrings branch May 11, 2026 23:09
@Quratulain-bilal Quratulain-bilal restored the docs/fix-pyclass-sphinx-role-in-session-docstrings branch May 11, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants