Skip to content

Latest commit

 

History

History
125 lines (74 loc) · 2.81 KB

File metadata and controls

125 lines (74 loc) · 2.81 KB

SectionMap

Module for splitting docstring into Section groups.

Handsdown API Index / Handsdown / Processors / SectionMap

Auto-generated documentation for handsdown.processors.section_map module.

SectionMap

Show source in section_map.py:9

Dict-based storage for parsed Section list.

Used for BaseDocstringProcessor.

Key is a Section title. Value is a related Section instance.

Signature

class SectionMap:
    def __init__(self) -> None: ...

SectionMap().iter

Show source in section_map.py:97

Iterate over existing Section objects.

Yields

Section objects in order of appearance.

Signature

def __iter__(self) -> Iterator[Section]: ...

See also

SectionMap().add_block

Show source in section_map.py:65

Add new SectionBlock to section section_name.

If Section does not exist - it is not created.

Arguments

  • section_name - Target section title

Signature

def add_block(self, section_name: str) -> None: ...

SectionMap().add_line

Show source in section_map.py:41

Add new line to the last SectionBlock of section section_name.

If line and section are empty - section is not created.

Arguments

  • section_name - Target section title
  • line - Line to add

Signature

def add_line(self, section_name: str, line: str) -> None: ...

SectionMap().add_line_indent

Show source in section_map.py:24

Add line respecting indent of the current section block.

Arguments

  • section_name - Target section title
  • line - Line to add

Signature

def add_line_indent(self, section_name: str, line: str) -> None: ...

SectionMap().trim_block

Show source in section_map.py:80

Delete last empty lines from the last SectionBlock.

If Section does not exist - it is not created.

Arguments

  • section_name - Target section title.

Signature

def trim_block(self, section_name: str) -> None: ...