Skip to content

FakeAnnotation#

Mypy_boto3_builder Index / Mypy Boto3 Builder / Type Annotations / FakeAnnotation

Auto-generated documentation for mypy_boto3_builder.type_annotations.fake_annotation module.

FakeAnnotation#

Show source in fake_annotation.py:17

Parent class for all type annotation wrappers.

Signature#

class FakeAnnotation(ABC): ...

FakeAnnotation().copy#

Show source in fake_annotation.py:104

Create a copy of type annotation wrapper.

Signature#

@abstractmethod
def __copy__(self) -> Self: ...

FakeAnnotation()._get_import_records#

Show source in fake_annotation.py:54

Get import record required for using type annotation.

Signature#

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

See also#

FakeAnnotation().copy#

Show source in fake_annotation.py:110

Create a copy of type annotation wrapper.

Signature#

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

FakeAnnotation().get_import_records#

Show source in fake_annotation.py:60

Get all import records required for using type annotation.

Signature#

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

See also#

FakeAnnotation().get_local_types#

Show source in fake_annotation.py:116

Get internal types generated by builder.

Signature#

def get_local_types(self) -> list["FakeAnnotation"]: ...

FakeAnnotation().get_sort_key#

Show source in fake_annotation.py:39

Get string to sort annotations.

Signature#

def get_sort_key(self) -> str: ...

FakeAnnotation().is_dict#

Show source in fake_annotation.py:80

Whether type annotation is Dict or TypedDict.

Signature#

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

FakeAnnotation().is_list#

Show source in fake_annotation.py:92

Whether type annotation is List.

Signature#

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

FakeAnnotation().is_literal#

Show source in fake_annotation.py:98

Whether type annotation is Literal.

Signature#

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

FakeAnnotation().is_typed_dict#

Show source in fake_annotation.py:86

Whether type annotation is TypedDict.

Signature#

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

FakeAnnotation().iterate_types#

Show source in fake_annotation.py:74

Iterate over all used type annotations recursively including self.

Signature#

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

FakeAnnotation().render#

Show source in fake_annotation.py:48

Render type annotation to a valid Python code for local usage.

Signature#

@abstractmethod
def render(self) -> str: ...

FakeAnnotation().render_definition#

Show source in fake_annotation.py:122

Render type annotation for debug purposes.

Signature#

def render_definition(self) -> str: ...