diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-01-27 23:17:08 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-01-27 23:17:08 +0200 |
commit | fdf2bb0fecc52535539cbb4eae684c02249b6c81 (patch) | |
tree | 81dfa6f81478796dd0b5aad71bcc0309d87b462a /cliapp | |
parent | c274e2940c2b0949f768fc914a4792d35682af9c (diff) | |
download | cliapp-fdf2bb0fecc52535539cbb4eae684c02249b6c81.tar.gz |
Drop empty lines, iterate over dict, not .keys()
Diffstat (limited to 'cliapp')
-rw-r--r-- | cliapp/app.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cliapp/app.py b/cliapp/app.py index 494d4b2..fe6a785 100644 --- a/cliapp/app.py +++ b/cliapp/app.py @@ -343,7 +343,7 @@ class Application(object): if self.subcommands: lines = [] prefix = 'Usage:' - for cmd in sorted(self.subcommands.keys()): + for cmd in sorted(self.subcommands): if all or cmd not in self.hidden_subcommands: args = self.cmd_synopsis.get(cmd, '') or '' lines.append( @@ -361,7 +361,7 @@ class Application(object): '''Format OptionParser description, with subcommand support.''' if self.subcommands: summaries = [] - for cmd in sorted(self.subcommands.keys()): + for cmd in sorted(self.subcommands): if show_all or cmd not in self.hidden_subcommands: summaries.append(self._format_subcommand_summary(cmd)) cmd_desc = ''.join(summaries) |