Skip to content

Function#

Mypy_boto3_builder Index / Mypy Boto3 Builder / Structures / Function

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

Function#

Show source in function.py:19

Module-level function.

Signature#

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

See also#

Function().copy#

Show source in function.py:145

Deep copy function.

Signature#

def __copy__(self: _R) -> _R: ...

Function().body#

Show source in function.py:86

Function body as a string.

Signature#

@property
def body(self) -> str: ...

Function().copy#

Show source in function.py:139

Deep copy function.

Signature#

def copy(self: _R) -> _R: ...

Function().create_request_type_annotation#

Show source in function.py:65

Create and set request_type_annotation TypedDict based on function arguments.

Signature#

def create_request_type_annotation(self, name: str) -> None: ...

Function().get_required_import_records#

Show source in function.py:103

Extract required import records.

Signature#

def get_required_import_records(self) -> set[ImportRecord]: ...

See also#

Function().is_kw_only#

Show source in function.py:120

Whether method arguments can be passed only as kwargs.

Signature#

def is_kw_only(self) -> bool: ...

Function().iterate_types#

Show source in function.py:93

Iterate over required type annotations.

Signature#

def iterate_types(self) -> Iterator[FakeAnnotation]: ...

See also#

Function().remove_argument#

Show source in function.py:160

Remove argument by name.

Signature#

def remove_argument(self, *names: str) -> Self: ...

Function().returns_none#

Show source in function.py:113

Whether return type is None.

Signature#

@property
def returns_none(self) -> bool: ...

Function().short_docstring#

Show source in function.py:52

Docstring without documentation links.

Signature#

@property
def short_docstring(self) -> str: ...

Function().type_hint_annotations#

Show source in function.py:126

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

Signature#

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

See also#