get_class_of¶
-
lsst.utils.introspection.
get_class_of
(typeOrName: Union[Type, str]) → Type¶ Given the type name or a type, return the python type.
If a type name is given, an attempt will be made to import the type.
Parameters: - typeOrName :
str
or Python class A string describing the Python class to load or a Python type.
Returns: - type_ :
type
Directly returns the Python type if a type was provided, else tries to import the given string and returns the resulting type.
Raises: - TypeError
Raised if a module is imported rather than a type.
Notes
This is a thin wrapper around
doImport
.- typeOrName :