quantlab.core.component.config_cls_of#
- quantlab.core.component.config_cls_of(cls)[source]#
Return the config class
clsdeclares inconfig_cls.The config class is never guessed. A guess could rebuild one factor backend’s config dict as another backend’s config, and it would let any importable callable be instantiated with a config dict.
- Parameters:
- clstype
The class to rebuild.
- Returns:
- type
Its
config_cls.
- Raises:
- TypeError
If
clshas noconfig_clsattribute, or it is not a type.
Examples
>>> from quantlab.label.forward import Forward >>> config_cls_of(Forward).__name__ 'ForwardConfig'