pydoc

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package pydoc parses Python docstrings into structured DocComment values. It auto-detects and supports three formats:

  • Google style: Args:, Returns:, Raises:
  • NumPy style: Parameters\n----------
  • Sphinx style: :param name: desc, :type name: type

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format int

Format represents the detected docstring format.

const (
	FormatGoogle Format = iota
	FormatNumPy
	FormatSphinx
	FormatPlain
)

type Parser

type Parser struct{}

Parser implements docparser.Parser for Python docstrings.

func New

func New() *Parser

New returns a new Python docstring parser.

func (*Parser) Parse

func (p *Parser) Parse(raw string) *docparser.DocComment

Parse parses a Python docstring into a DocComment. It auto-detects the format (Google, NumPy, or Sphinx) from the content.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL