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

ImportRecord

Auto-generated documentation for builder.mypy_boto3_builder.import_helpers.import_record module.

Helper for Python import strings.

ImportRecord

[find in source code]

total_ordering
class ImportRecord():
    def __init__(
        source: ImportString,
        name: str = '',
        alias: str = '',
        min_version: Tuple[int, ...] = (3, 8),
        fallback: Optional['ImportRecord'] = None,
    ) -> None:

Helper for Python import strings.

Arguments

ImportRecord.empty

[find in source code]

@classmethod
def empty() -> 'ImportRecord':

ImportRecord().get_external

[find in source code]

def get_external(_module_name: str) -> 'ImportRecord':

Get itself.

Overriden by InternalImportRecord.

ImportRecord().get_local_name

[find in source code]

def get_local_name() -> str:

Get local import name.

ImportRecord().is_builtins

[find in source code]

def is_builtins() -> bool:

Whether import is from Python builtins module.

ImportRecord().is_local

[find in source code]

def is_local() -> bool:

Whether import is from local module.

ImportRecord().is_standalone

[find in source code]

def is_standalone() -> bool:

Whether import record should not be grouped.

ImportRecord().is_third_party

[find in source code]

def is_third_party() -> bool:

Whether import is from 3rd party module.

ImportRecord().is_type_defs

[find in source code]

def is_type_defs() -> bool:

Whether import is from type_defs module.

ImportRecord().render

[find in source code]

def render() -> str: