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:13
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 = (3, 8),
fallback: _R | None = None,
) -> None:
...
See also
ImportRecord.empty
Show source in import_record.py:48
Whether import record is an empty string.
Signature
@classmethod
def empty(cls: type[_R]) -> _R:
...
ImportRecord().get_external
Show source in import_record.py:161
Get itself.
Overriden by InternalImportRecord
.
Signature
def get_external(self, module_name: str) -> "ImportRecord":
...
ImportRecord().get_local_name
Show source in import_record.py:115
Get local import name.
Signature
def get_local_name(self) -> str:
...
ImportRecord().is_builtins
Show source in import_record.py:121
Whether import is from Python builtins
module.
Signature
def is_builtins(self) -> bool:
...
ImportRecord().is_local
Show source in import_record.py:143
Whether import is from local module.
Signature
def is_local(self) -> bool:
...
ImportRecord().is_standalone
Show source in import_record.py:169
Whether import record should not be grouped.
Signature
def is_standalone(self) -> bool:
...
ImportRecord().is_third_party
Show source in import_record.py:133
Whether import is from 3rd party module.
Signature
def is_third_party(self) -> bool:
...
ImportRecord().is_type_defs
Show source in import_record.py:127
Whether import is from type_defs
module.
Signature
def is_type_defs(self) -> bool:
...
ImportRecord().render
Show source in import_record.py:55
Get rendered string.
Signature
def render(self) -> str:
...