FakeAnnotation
Auto-generated documentation for builder.mypy_boto3_builder.type_annotations.fake_annotation module.
Parent class for all type annotation wrappers.
- mypy-boto3 / Modules /
Builder
/ Mypy Boto3 Builder / Type Annotations / FakeAnnotation
FakeAnnotation
total_ordering
class FakeAnnotation():
Parent class for all type annotation wrappers.
FakeAnnotation().add_child
def add_child(child: 'FakeAnnotation') -> None:
Add new child to TypeSubscript
or TypeTypedDict
annotation.
FakeAnnotation().add_literal_child
def add_literal_child(child: Any) -> None:
Add new child to TypeLiteral
annotation.
FakeAnnotation().copy
@abstractmethod
def copy() -> 'FakeAnnotation':
Create a copy of type annotation wrapper.
FakeAnnotation().get_import_record
@abstractmethod
def get_import_record() -> ImportRecord:
Get import record required for using type annotation.
FakeAnnotation().get_types
def get_types() -> Set['FakeAnnotation']:
Get all used type annotations recursively including self.
FakeAnnotation().is_dict
def is_dict() -> bool:
Whether type annotation is Dict
or TypedDict
.
FakeAnnotation().is_list
def is_list() -> bool:
Whether type annotation is List
.
FakeAnnotation().is_literal
def is_literal() -> bool:
Whether type annotation is Literal
.
FakeAnnotation().render
@abstractmethod
def render(parent_name: str = '') -> str:
Render type annotation to a valid Python code for local usage.