예제 #1
0
def parse_arguments_to_var_dict(args, name):
    result = {}
    for arg in args:
        name, value = parse_argument(arg)
        if name:
            result[name] = value
    if not args and name:
        for var in variablematcher.find_variable_basenames(name):
            if variablematcher.is_scalar_variable(var):
                result[var] = None
    return result
예제 #2
0
def parse_arguments_to_var_dict(args, name):
    result = {}
    for arg in args:
        name, value = parse_argument(arg)
        if name:
            result[name] = value
    if not args and name:
        for var in variablematcher.find_variable_basenames(name):
            if variablematcher.is_scalar_variable(var):
                result[var] = None
    return result
예제 #3
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 variablematcher.find_variable_basenames(name):
            if variablematcher.is_scalar_variable(var):
                result[var] = None
    return result
예제 #4
0
 def validate_name(self, new_name):
     if variablematcher.is_scalar_variable(self.name):
         return self.parent.validate_scalar_variable_name(new_name, self)
     if variablematcher.is_dict_variable(self.name):
         return self.parent.validate_dict_variable_name(new_name, self)
     return self.parent.validate_list_variable_name(new_name, self)
예제 #5
0
 def validate_name(self, new_name):
     if variablematcher.is_scalar_variable(self.name):
         return self.parent.validate_scalar_variable_name(new_name, self)
     if variablematcher.is_dict_variable(self.name):
         return self.parent.validate_dict_variable_name(new_name, self)
     return self.parent.validate_list_variable_name(new_name, self)