Function

Auto-generated documentation for mypy_boto3_builder.structures.function module.

Module-level function.

Function

[find in source code]

class Function():
    def __init__(
        name: str,
        arguments: Iterable[Argument],
        return_type: FakeAnnotation,
        docstring: str = '',
        decorators: Iterable[FakeAnnotation] = tuple(),
        body_lines: Iterable[str] = tuple(),
        type_ignore: bool = False,
        is_async: bool = False,
    ):

Module-level function.

See also

Function().body

[find in source code]

@property
def body() -> str:

Function body as a string.

Function().create_request_type_annotation

[find in source code]

def create_request_type_annotation(name: str) -> None:

Create and set request_type_annotation TypedDict based on function arguments.

Function().get_required_import_records

[find in source code]

def get_required_import_records() -> set[ImportRecord]:

Extract required import records.

See also

Function().is_kw_only

[find in source code]

def is_kw_only() -> bool:

Whether method arguments can be passed only as kwargs.

Function().iterate_types

[find in source code]

def iterate_types() -> Iterator[FakeAnnotation]:

Iterate over required type annotations.

See also

Function().returns_none

[find in source code]

@property
def returns_none() -> bool:

Whether return type is None.

Function().short_docstring

[find in source code]

@property
def short_docstring() -> str:

Docstring without documentation links.

Function().type_hint_annotations

[find in source code]

@property
def type_hint_annotations() -> list[FakeAnnotation]:

Type annotations list from arguments and return type with internal types.

See also