Function register_config_class

Synopsis

def register_config_class(class_name, class_def)

Description

Saves the config class name and definition

Source

Lines 20-29 in anyfig/figutils.py.

def register_config_class(class_name, class_def):
  ''' Saves the config class name and definition '''
  err_msg = (
    f"The config class '{class_name}' has already been registered. Duplicated names aren't allowed. "
    f"The registered classes are '{registered_config_classes}'")
  assert class_name not in registered_config_classes, err_msg

  registered_config_classes[class_name] = class_def







Add Discussion as Guest

Log in