Function frozen

Synopsis

def frozen(self, freeze=True)

Description

Freeze/unfreeze the config. Frozen configs are unmutable

Args: freeze (bool, optional): Freeze config. Defaults to True.

Returns: ConfigClass: Config instance

Source

Lines 33-48 in anyfig/config_functions.py.

def frozen(self, freeze=True):
  """
  Freeze/unfreeze the config. Frozen configs are unmutable
  Args:
      freeze (bool, optional): Freeze config. Defaults to True.
  Returns:
      ConfigClass: Config instance
  """
  self._frozen = freeze
  for _, val in self.get_parameters(copy=False).items():
    if figutils.is_config_class(val):
      val.frozen(freeze)
  return self





Add Discussion as Guest

Log in