Beispiel #1
0
def parse_arguments_to_var_dict(args, name):
    result = {}
    for arg in args:
        parsed = parse_argument(arg)
        if parsed:
            result[parsed[0]] = parsed[1]
    if not args and name:
        for var in find_variable_basenames(name):
            if is_scalar_variable(var):
                result[var] = None
    return result
Beispiel #2
0
def parse_arguments_to_var_dict(args, name):
    result = {}
    for arg in args:
        parsed = parse_argument(arg)
        if parsed:
            result[parsed[0]] = parsed[1]
    if not args and name:
        for var in find_variable_basenames(name):
            if is_scalar_variable(var):
                result[var] = None
    return result
 def validate_name(self, new_name):
     if utils.is_scalar_variable(self.name):
         return self.parent.validate_scalar_variable_name(new_name, self)
     return self.parent.validate_list_variable_name(new_name, self)
Beispiel #4
0
 def validate_name(self, new_name):
     if utils.is_scalar_variable(self.name):
         return self.parent.validate_scalar_variable_name(new_name, self)
     return self.parent.validate_list_variable_name(new_name, self)