DocstringParser

mypy-boto3-builder Index / Mypy Boto3 Builder / Parsers / Docstring Parser / DocstringParser

Auto-generated documentation for mypy_boto3_builder.parsers.docstring_parser.docstring_parser module.

DocstringParser

Show source in docstring_parser.py:26

Botocore docstring parser.

Arguments

  • prefix - Prefix for generated TypeDict names.
  • class_name - Parent class name.
  • method_name - Method name.
  • arguments - List of arguments extracted from argspec.

Signature

class DocstringParser:
    def __init__(
        self,
        service_name: ServiceName,
        class_name: str,
        method_name: str,
        arguments: list[Argument],
    ) -> None:
        ...

See also

DocstringParser().get_arguments

Show source in docstring_parser.py:191

Get list of function arguments with type annottions.

Arguments

  • input_string - Function docstring.

Returns

A list of Argument structures.

Signature

def get_arguments(self, input_string: str) -> list[Argument]:
    ...

See also

DocstringParser().get_return_type

Show source in docstring_parser.py:298

Get function return type annotation.

Arguments

  • input_string - Function docstring.

Returns

A valid type annotation.

Signature

def get_return_type(self, input_string: str) -> FakeAnnotation:
    ...

See also