doImportType

lsst.utils.doImportType(importable: str) type

Import a python type given an importable string and return it.

Parameters:
importablestr

String containing dot-separated path of a Python class, or member function.

Returns:
typetype

Type object. Can not return a module.

Raises:
TypeError

importable is not a str or the imported type is a module.

ModuleNotFoundError

No module in the supplied import string could be found.

ImportError

importable is found but can not be imported or the requested item could not be retrieved from the imported module.