DocstringParser
Auto-generated documentation for builder.mypy_boto3_builder.parsers.docstring_parser.docstring_parser module.
Botocore docstring parser.
- mypy-boto3 / Modules /
Builder
/ Mypy Boto3 Builder / Parsers / Docstring Parser / DocstringParser
DocstringParser
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.
DocstringParser().get_arguments
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
def get_return_type(input_string: str) -> FakeAnnotation:
Get function return type annotation.
Arguments
input_string
- Function docstring.
Returns
A valid type annotation.