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:14

Parent class for all type annotation wrappers.

Signature#

class FakeAnnotation(ABC): ...

FakeAnnotation().copy#

Show source in fake_annotation.py:116

Create a copy of type annotation wrapper.

Signature#

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

FakeAnnotation().eq#

Show source in fake_annotation.py:27

Whether two annotations are equal.

Signature#

def __eq__(self, other: object) -> bool: ...

FakeAnnotation().gt#

Show source in fake_annotation.py:42

Compare two annotations for sorting.

Signature#

def __gt__(self: Self, other: Self) -> bool: ...

FakeAnnotation().hash#

Show source in fake_annotation.py:21

Calculate hash value based on string render.

Signature#

def __hash__(self) -> int: ...

FakeAnnotation().lt#

Show source in fake_annotation.py:36

Compare two annotations for sorting.

Signature#

def __lt__(self: Self, other: Self) -> bool: ...

FakeAnnotation().str#

Show source in fake_annotation.py:54

Render annotation usage as a valid Python statement.

Signature#

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

FakeAnnotation()._get_import_records#

Show source in fake_annotation.py:66

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:122

Create a copy of type annotation wrapper.

Signature#

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

FakeAnnotation().get_import_records#

Show source in fake_annotation.py:72

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:128

Get internal types generated by builder.

Signature#

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

FakeAnnotation().get_sort_key#

Show source in fake_annotation.py:48

Get string to sort annotations.

Signature#

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

FakeAnnotation().is_dict#

Show source in fake_annotation.py:92

Whether type annotation is Dict or TypedDict.

Signature#

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

FakeAnnotation().is_list#

Show source in fake_annotation.py:104

Whether type annotation is List.

Signature#

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

FakeAnnotation().is_literal#

Show source in fake_annotation.py:110

Whether type annotation is Literal.

Signature#

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

FakeAnnotation().is_typed_dict#

Show source in fake_annotation.py:98

Whether type annotation is TypedDict.

Signature#

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

FakeAnnotation().iterate_types#

Show source in fake_annotation.py:86

Iterate over all used type annotations recursively including self.

Signature#

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

FakeAnnotation().render#

Show source in fake_annotation.py:60

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:134

Render type annotation for debug purposes.

Signature#

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