ExternalImport

Auto-generated documentation for mypy_boto3_builder.type_annotations.external_import module.

Wrapper for type annotations imported from 3rd party libraries, like boto3.service.Service.

ExternalImport

[find in source code]

class ExternalImport(FakeAnnotation):
    def __init__(
        source: ImportString,
        name: str = '',
        alias: str = '',
    ) -> None:

Wrapper for type annotations imported from 3rd party libraries, like boto3.service.Service.

Arguments

  • source - Module import string.
  • name - Import name.
  • alias - Import local name.

See also

ExternalImport().copy

[find in source code]

def copy() -> 'ExternalImport':

Create a copy of type annotation wrapper.

ExternalImport().get_import_record

[find in source code]

def get_import_record() -> ImportRecord:

Get import record required for using type annotation.

See also

ExternalImport().render

[find in source code]

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

Get string with local name to use.

Returns

Import record local name.