def get_choices(choices): for value, help_text in choices: if value[0] != "-": name = convert_choice_name(value) + "_ASC" else: name = convert_choice_name(value[1:]) + "_DESC" description = help_text yield name, value, description
def get_choices(choices): for value, help_text in choices: if value: name = convert_choice_name(value) description = help_text yield name, value, description