Skip to content

ImportRecord#

Mypy_boto3_builder Index / Mypy Boto3 Builder / Import Helpers / ImportRecord

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

ImportRecord#

Show source in import_record.py:18

Helper for Python import strings.

Arguments#

  • source - Source of import.
  • name - Import name.
  • alias - Import local name.
  • min_version - Minimum Python version, used for fallback.
  • fallback - Fallback ImportRecord.

Signature#

class ImportRecord:
    def __init__(
        self: _R,
        source: ImportString,
        name: str = "",
        alias: str = "",
        min_version: tuple[int, ...] | None = None,
        fallback: _R | None = None,
    ) -> None: ...

See also#

ImportRecord.empty#

Show source in import_record.py:59

Whether import record is an empty string.

Signature#

@classmethod
def empty(cls) -> Self: ...

ImportRecord().get_local_name#

Show source in import_record.py:117

Get local import name.

Signature#

def get_local_name(self) -> str: ...

ImportRecord().is_builtins#

Show source in import_record.py:123

Whether import is from Python builtins module.

Signature#

def is_builtins(self) -> bool: ...

ImportRecord().is_empty#

Show source in import_record.py:53

Whether import record is an empty string.

Signature#

def is_empty(self) -> bool: ...

ImportRecord().is_local#

Show source in import_record.py:144

Whether import is from local module.

Signature#

def is_local(self) -> bool: ...

ImportRecord().is_third_party#

Show source in import_record.py:135

Whether import is from 3rd party module.

Signature#

def is_third_party(self) -> bool: ...

ImportRecord().is_type_defs#

Show source in import_record.py:129

Whether import is from type_defs module.

Signature#

def is_type_defs(self) -> bool: ...

ImportRecord().needs_sys_fallback#

Show source in import_record.py:162

Whether ImportString requires sys module.

Signature#

def needs_sys_fallback(self) -> bool: ...

ImportRecord().render#

Show source in import_record.py:66

Get rendered string.

Signature#

def render(self) -> str: ...