def _options_to_args(**options):
flags = []<EOL>for name in sorted(options):<EOL><INDENT>value = options[name]<EOL>formatted_flag = '<STR_LIT>' % name if len(name) > <NUM_LIT:1> else '<STR_LIT>' % name<EOL>formatted_flag = formatted_flag.replace('<STR_LIT:_>', '<STR_LIT:->')<EOL>accepts_no_arguments = formatted_flag in NO_ARGUMENT_OPTIONS<EOL>if value is None or (value is False and accepts_no_arguments):<EOL><INDENT>continue<EOL><DEDENT>flags.append(formatted_flag)<EOL>if accepts_no_arguments:<EOL><INDENT>continue<EOL><DEDENT>flags.append(six.text_type(value))<EOL><DEDENT>return flags<EOL>
Converts ``options`` into a list of command-line arguments.
Skip arguments where no value is provided
For flag-type (No argument) variables, pass only the name and only then if the value is True