Function check_allowed_input_argument

Synopsis

def check_allowed_input_argument(config_obj, name, deep_name)

Description

Raises error if the input argument isn't marked as "allowed"

Source

Lines 128-135 in anyfig/figutils.py.

def check_allowed_input_argument(config_obj, name, deep_name):
  ''' Raises error if the input argument isn't marked as "allowed" '''
  allowed_args = get_allowed_cli_args(config_obj)
  if name not in allowed_args:
    err_msg = f"Input argument '{deep_name}' is not allowed to be overwritten. See --help for more info"
    raise ValueError(err_msg)






Add Discussion as Guest

Log in