Skip to content

Honour the package's __docformat__ when rendering docstrings - #96

Merged
arrufat merged 1 commit into
mainfrom
honour-docformat
Sep 4, 2026
Merged

Honour the package's __docformat__ when rendering docstrings#96
arrufat merged 1 commit into
mainfrom
honour-docformat

Conversation

@arrufat

@arrufat arrufat commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Companion to lightpanda-io/lightpanda-python#7, which adds Google-style Args: sections to every generated method and declares __docformat__ = "google" on the package.

  • Convert docstrings with the docformat the package declares instead of assuming reST. pdoc runs its reST pass first either way, so the existing roles keep rendering.
  • Render pdoc's section headings (###### Arguments:) as bold labels so they do not land in the page outline.
  • Leave list-item continuation lines alone when fencing indented blocks; previously they would have been wrapped in a text fence.

The page itself does not change until the Python PR is merged and the daily workflow regenerates it; I verified the output against that branch locally.

lightpanda-python is switching to Google-style Args sections in its
docstrings (lightpanda-io/lightpanda-python#7). Convert docstrings with the
docformat the package declares instead of assuming reST, render pdoc's
section headings as bold labels so they stay out of the page outline, and
leave list-item continuation lines alone when fencing indented blocks.
@arrufat
arrufat merged commit 403e771 into main Sep 4, 2026
2 checks passed
@arrufat
arrufat deleted the honour-docformat branch September 4, 2026 19:26
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