TypeSubscript#
Mypy_boto3_builder Index / Mypy Boto3 Builder / Type Annotations / TypeSubscript
Auto-generated documentation for mypy_boto3_builder.type_annotations.type_subscript module.
TypeSubscript#
Show source in type_subscript.py:16
Wrapper for subscript type annotations, like List[str]
.
Arguments#
parent
- Parent type annotation.children
- Children type annotations.stringify
- Convert type annotation to string.
Signature#
class TypeSubscript(FakeAnnotation):
def __init__(
self,
parent: FakeAnnotation,
children: Iterable[FakeAnnotation] = (),
stringify: bool = False,
) -> None: ...
See also#
TypeSubscript().copy#
Show source in type_subscript.py:91
Create a copy of type annotation wrapper.
Signature#
TypeSubscript().add_child#
Show source in type_subscript.py:73
Add new child to Substcript.
Signature#
See also#
TypeSubscript().find_type_annotation_parent#
Show source in type_subscript.py:110
Check recursively if child is present in subscript.
Signature#
See also#
TypeSubscript().get_import_records#
Show source in type_subscript.py:55
Get all import records required for using type annotation.
Signature#
See also#
TypeSubscript().get_local_types#
Show source in type_subscript.py:101
Get internal types generated by builder.
Signature#
See also#
TypeSubscript().is_dict#
Show source in type_subscript.py:79
Whether subscript parent is Dict.
Signature#
TypeSubscript().is_list#
Show source in type_subscript.py:85
Whether subscript parent is List.
Signature#
TypeSubscript().iterate_types#
Show source in type_subscript.py:65
Extract type annotations from children.
Signature#
See also#
TypeSubscript().render#
Show source in type_subscript.py:39
Render type annotation to a valid Python code for local usage.
Returns#
A string with a valid type annotation.
Signature#
TypeSubscript().replace_child#
Show source in type_subscript.py:125
Replace child type annotation with a new one.