"""
This type stub file was generated by pyright.
"""

from contextlib import contextmanager
from typing import TYPE_CHECKING
from jinja2 import Environment, pass_environment
from collections.abc import Generator
from docutils.statemachine import StringList

"""reST helper functions."""
if TYPE_CHECKING:
    ...
logger = ...
FIELD_NAME_RE = ...
symbols_re = ...
SECTIONING_CHARS = ...
WIDECHARS: dict[str, str] = ...
def escape(text: str) -> str:
    ...

def textwidth(text: str, widechars: str = ...) -> int:
    """Get width of text."""
    ...

@pass_environment
def heading(env: Environment, text: str, level: int = ...) -> str:
    """Create a heading for *level*."""
    ...

@contextmanager
def default_role(docname: str, name: str) -> Generator[None, None, None]:
    ...

def prepend_prolog(content: StringList, prolog: str) -> None:
    """Prepend a string to content body as prolog."""
    ...

def append_epilog(content: StringList, epilog: str) -> None:
    """Append a string to content body as epilog."""
    ...

