def parse_vars(variables):
    """Parse variables passed as args to list of tuples
    If variable has required value then
    it'll be appended in format (key, value).
    If variable has no variable (it should just exist)
    then it'll be appended as (key,)

    :param variables: string of variables in args format 'key:value,key2:value2,key3'
    :type variables: str

    :return: List of parsed variables
    :rtype: list
    """
    list_of_items = variables.split(',') if variables else []
    parsed_variables = []
    for variable in list_of_items:
        if ':' in variable:
            parsed_variables.append(tuple(variable.split(':')))
        else:
            parsed_variables.append((variable, None))
    return parsed_variables