DocstringParser

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

Botocore docstring parser.

DocstringParser

[find in source code]

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

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.

See also

DocstringParser().get_arguments

[find in source code]

def get_arguments(input_string: str) -> List[Argument]:

Get list of function arguments with type annottions.

Arguments

  • input_string - Function docstring.

Returns

A list of Argument structures.

DocstringParser().get_return_type

[find in source code]

def get_return_type(input_string: str) -> FakeAnnotation:

Get function return type annotation.

Arguments

  • input_string - Function docstring.

Returns

A valid type annotation.

See also