diff options
author | Sushil Kumar <sushil.kumar2@globallogic.com> | 2014-01-13 17:04:50 +0000 |
---|---|---|
committer | Sushil Kumar <sushil.kumar2@globallogic.com> | 2014-05-09 08:54:39 +0000 |
commit | 8bc695bd70853305bdd1009a69503728712f57a5 (patch) | |
tree | 315d6cb2c99ce9d610b32a6340d58b2decce60ad /troveclient/shell.py | |
parent | 4643f78a200aff5155e7029dfde0eebe9bef0e70 (diff) | |
download | python-troveclient-8bc695bd70853305bdd1009a69503728712f57a5.tar.gz |
Enabled F821, H306, H402, and H404 flake8 rule
Reasons:
- F821 is disabled.
- H306 is disabled.
- H402 is disabled.
- H404 is disabled.
Changes:
- Updates tox.ini to enable F821, H306, H402 and H404 rules.
- Updates code for F821, H306, H402 and H404 violation.
Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
Diffstat (limited to 'troveclient/shell.py')
-rw-r--r-- | troveclient/shell.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/troveclient/shell.py b/troveclient/shell.py index e5d9490..0f6522e 100644 --- a/troveclient/shell.py +++ b/troveclient/shell.py @@ -24,20 +24,21 @@ import argparse import glob import imp import itertools +import logging import os import pkgutil import sys -import logging import pkg_resources import six import troveclient import troveclient.extension + from troveclient import client -from troveclient.openstack.common import strutils from troveclient.openstack.common.apiclient import exceptions as exc from troveclient.openstack.common import gettextutils as gtu +from troveclient.openstack.common import strutils from troveclient import utils from troveclient.v1 import shell as shell_v1 @@ -487,9 +488,7 @@ class OpenStackTroveShell(object): @utils.arg('command', metavar='<subcommand>', nargs='?', help='Display help for <subcommand>.') def do_help(self, args): - """ - Displays help about this program or one of its subcommands. - """ + """Displays help about this program or one of its subcommands.""" if args.command: if args.command in self.subcommands: self.subcommands[args.command].print_help() @@ -508,7 +507,8 @@ class OpenStackHelpFormatter(argparse.HelpFormatter): super(OpenStackHelpFormatter, self).start_section(heading) def _format_usage(self, usage, actions, groups, prefix): - """ + """Formats the argument list to correct argument positions. + Print positionals before optionals in the usage string to help users avoid argparse nargs='*' problems. |