Skip to content

parsePythonDocstring

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/doc-annotations.ts

Parse a Python docstring: first line (or sentence) is the summary, the rest the description.

Sphinx/Google/NumPy section furniture is left in the description untouched — it is the author's text, the reader renders markdown, and rewriting it would be inventing prose. :param name: desc is read because it is the one Python convention that names parameters precisely enough to attach without guessing.

Signature

ts
function parsePythonDocstring(raw: string): AuthoredDocs

Parameters

NameType
rawstring

Returns: AuthoredDocs

Was this page helpful?

Download as PDF