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

TypeAnnotation

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

Wrapper for simple type annotation like str or Dict.

TypeAnnotation

[find in source code]

class TypeAnnotation(FakeAnnotation):
    def __init__(wrapped_type: Any) -> None:

Wrapper for simple type annotation like str or Dict.

Arguments

TypeAnnotation().copy

[find in source code]

def copy() -> 'TypeAnnotation':

Create a copy of type annotation wrapper.

TypeAnnotation().get_import_name

[find in source code]

def get_import_name() -> str:

TypeAnnotation().get_import_record

[find in source code]

def get_import_record() -> ImportRecord:

TypeAnnotation().is_dict

[find in source code]

def is_dict() -> bool:

TypeAnnotation().is_list

[find in source code]

def is_list() -> bool:

TypeAnnotation().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.