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

Parent class for all type annotation wrappers.

Signature

class FakeAnnotation(ABC):
    ...

FakeAnnotation().add_child

Show source in fake_annotation.py:65

Add new child to TypeSubscript or TypeTypedDict annotation.

Signature

def add_child(self: _R, child: _R) -> None:
    ...

FakeAnnotation().copy

Show source in fake_annotation.py:94

Create a copy of type annotation wrapper.

Signature

@abstractmethod
def copy(self: _R) -> _R:
    ...

FakeAnnotation().get_import_record

Show source in fake_annotation.py:53

Get import record required for using type annotation.

Signature

@abstractmethod
def get_import_record(self) -> ImportRecord:
    ...

See also

FakeAnnotation().get_local_types

Show source in fake_annotation.py:100

Get internal types generated by builder.

Signature

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

FakeAnnotation().get_sort_key

Show source in fake_annotation.py:38

Get string to sort annotations.

Signature

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

FakeAnnotation().is_dict

Show source in fake_annotation.py:70

Whether type annotation is Dict or TypedDict.

Signature

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

FakeAnnotation().is_list

Show source in fake_annotation.py:82

Whether type annotation is List.

Signature

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

FakeAnnotation().is_literal

Show source in fake_annotation.py:88

Whether type annotation is Literal.

Signature

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

FakeAnnotation().is_typed_dict

Show source in fake_annotation.py:76

Whether type annotation is TypedDict.

Signature

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

FakeAnnotation().iterate_types

Show source in fake_annotation.py:59

Iterate over all used type annotations recursively including self.

Signature

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

FakeAnnotation().render

Show source in fake_annotation.py:47

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

Signature

@abstractmethod
def render(self, parent_name: str = "") -> str:
    ...