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

TypeSubscript

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

Wrapper for subscript type annotations, like List[str].

TypeSubscript

[find in source code]

class TypeSubscript(FakeAnnotation):
    def __init__(
        parent: TypeAnnotation,
        children: Iterable[FakeAnnotation] = (),
    ) -> None:

Wrapper for subscript type annotations, like List[str].

Arguments

TypeSubscript().add_child

[find in source code]

def add_child(child: FakeAnnotation) -> None:

TypeSubscript().copy

[find in source code]

def copy() -> 'TypeSubscript':

Create a copy of type annotation wrapper.

TypeSubscript().get_import_record

[find in source code]

def get_import_record() -> ImportRecord:

Get import record required for using type annotation.

TypeSubscript().get_types

[find in source code]

def get_types() -> Set[FakeAnnotation]:

TypeSubscript().is_dict

[find in source code]

def is_dict() -> bool:

TypeSubscript().is_list

[find in source code]

def is_list() -> bool:

TypeSubscript().render

[find in source code]

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

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

Returns

A string with a valid type annotation.