View on GitHub

mypy_boto3

Type annotations for boto3 compatible with mypy, VSCode and PyCharm

Download this project as a .zip file Download this project as a tar.gz file

FakeAnnotation

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

Parent class for all type annotation wrappers.

FakeAnnotation

[find in source code]

total_ordering
class FakeAnnotation():

Parent class for all type annotation wrappers.

FakeAnnotation().add_child

[find in source code]

def add_child(child: 'FakeAnnotation') -> None:

Add new child to TypeSubscript or TypeTypedDict annotation.

FakeAnnotation().add_literal_child

[find in source code]

def add_literal_child(child: Any) -> None:

Add new child to TypeLiteral annotation.

FakeAnnotation().copy

[find in source code]

@abstractmethod
def copy() -> 'FakeAnnotation':

Create a copy of type annotation wrapper.

FakeAnnotation().get_import_record

[find in source code]

@abstractmethod
def get_import_record() -> ImportRecord:

Get import record required for using type annotation.

FakeAnnotation().get_types

[find in source code]

def get_types() -> Set['FakeAnnotation']:

Get all used type annotations recursively including self.

FakeAnnotation().is_dict

[find in source code]

def is_dict() -> bool:

Whether type annotation is Dict or TypedDict.

FakeAnnotation().is_list

[find in source code]

def is_list() -> bool:

Whether type annotation is List.

FakeAnnotation().is_literal

[find in source code]

def is_literal() -> bool:

Whether type annotation is Literal.

FakeAnnotation().render

[find in source code]

@abstractmethod
def render(parent_name: str = '') -> str:

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