get_class_of#
- lsst.utils.introspection.get_class_of(typeOrName: type | str | ModuleType) 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
stror 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.
Notes#
This is a thin wrapper around
doImport.Raises#
- TypeError
Raised if a module is imported rather than a type.
- typeOrName