Function
mypy-boto3-builder Index / Mypy Boto3 Builder / Structures / Function
Auto-generated documentation for mypy_boto3_builder.structures.function module.
Function
Module-level function.
Signature
class Function:
def __init__(
self,
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,
):
...
See also
Function().body
Function body as a string.
Signature
@property
def body(self) -> str:
...
Function().create_request_type_annotation
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
Extract required import records.
Signature
def get_required_import_records(self) -> set[ImportRecord]:
...
See also
Function().is_kw_only
Show source in function.py:111
Whether method arguments can be passed only as kwargs.
Signature
def is_kw_only(self) -> bool:
...
Function().iterate_types
Iterate over required type annotations.
Signature
def iterate_types(self) -> Iterator[FakeAnnotation]:
...
See also
Function().returns_none
Show source in function.py:104
Whether return type is None.
Signature
@property
def returns_none(self) -> bool:
...
Function().short_docstring
Docstring without documentation links.
Signature
@property
def short_docstring(self) -> str:
...
Function().type_hint_annotations
Show source in function.py:117
Type annotations list from arguments and return type with internal types.
Signature
@property
def type_hint_annotations(self) -> list[FakeAnnotation]:
...