fixed tox style suggestions

also following the "no contrived examples" rule by using
beatles as artist in example
This commit is contained in:
Peter Kessen 2015-08-28 08:47:25 +02:00
parent eb68d4ddb5
commit b857320105
2 changed files with 4 additions and 2 deletions

View file

@ -789,7 +789,7 @@ class CommonOptionsParser(optparse.OptionParser, object):
def add_help_text(self, text):
"""Add a custom help text below the usage line to give extra hints
"""
if self._added_help == False:
if self._added_help is False:
self.usage = self.usage + "\n"
self._added_help = True
self.usage = self.usage + "\n"

View file

@ -974,7 +974,9 @@ def list_func(lib, opts, args):
list_cmd = ui.Subcommand('list', help='query the library', aliases=('ls',))
list_cmd.parser.add_help_text('query the library')
list_cmd.parser.add_help_text('Example usage: %prog -f \'$album: $title\' artist:foo')
list_cmd.parser.add_help_text(
'Example usage: %prog -f \'$album: $title\' artist:beatles'
)
list_cmd.parser.add_all_common_options()
list_cmd.func = list_func
default_commands.append(list_cmd)