diff options
author | Dirk Mueller <dirk@dmllr.de> | 2013-12-14 12:12:43 +0100 |
---|---|---|
committer | Dirk Mueller <dirk@dmllr.de> | 2013-12-18 14:08:37 +0100 |
commit | d4a62491e177b06ee9796fea5708792fb2152e9f (patch) | |
tree | e18599f4856496341f37bcbb90fac593f065c559 /troveclient/compat | |
parent | 30587ea4485e1f12c8116e7f3b26a08e3054409b (diff) | |
download | python-troveclient-d4a62491e177b06ee9796fea5708792fb2152e9f.tar.gz |
Tighten flake8 checks in Gating
There are a few checks that already pass:
- F401 - unused imports of modules
- F403 - ‘from module import *’ used; unable to detect undefined names
And there are two (H401 and H403) that can be made
passing easily. Enable gating on all of them.
Change-Id: I9d3c49ecea1b2171d194ab6cc751316c252081e8
Diffstat (limited to 'troveclient/compat')
-rw-r--r-- | troveclient/compat/cli.py | 3 | ||||
-rw-r--r-- | troveclient/compat/common.py | 11 | ||||
-rw-r--r-- | troveclient/compat/exceptions.py | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/troveclient/compat/cli.py b/troveclient/compat/cli.py index fcb1c6a..892f8b8 100644 --- a/troveclient/compat/cli.py +++ b/troveclient/compat/cli.py @@ -202,7 +202,8 @@ class UserCommands(common.AuthedCommandsBase): def grant(self): """Allow an existing user permissions to access one or more - databases.""" + databases. + """ self._require('id', 'name', 'databases') self._make_list('databases') self.dbaas.users.grant(self.id, self.name, self.databases, diff --git a/troveclient/compat/common.py b/troveclient/compat/common.py index a50914e..0cfbd9e 100644 --- a/troveclient/compat/common.py +++ b/troveclient/compat/common.py @@ -29,7 +29,8 @@ from troveclient.openstack.common.py3kcompat import urlutils def methods_of(obj): """Get all callable methods of an object that don't start with underscore - returns a list of tuples of the form (method_name, method)""" + returns a list of tuples of the form (method_name, method). + """ result = {} for i in dir(obj): if callable(getattr(obj, i)) and not i.startswith('_'): @@ -82,7 +83,8 @@ def quote_user_host(user, host): class CliOptions(object): """A token object containing the user, apikey and token which - is pickleable.""" + is pickleable. + """ APITOKEN = os.path.expanduser("~/.apitoken") @@ -400,8 +402,9 @@ class AuthedCommandsBase(CommandsBase): class Paginated(object): - """ Pretends to be a list if you iterate over it, but also keeps a - next property you can use to get the next page of data. """ + """Pretends to be a list if you iterate over it, but also keeps a + next property you can use to get the next page of data. + """ def __init__(self, items=[], next_marker=None, links=[]): self.items = items diff --git a/troveclient/compat/exceptions.py b/troveclient/compat/exceptions.py index 2ec3fb4..9761128 100644 --- a/troveclient/compat/exceptions.py +++ b/troveclient/compat/exceptions.py @@ -15,7 +15,8 @@ class UnsupportedVersion(Exception): """Indicates that the user is trying to use an unsupported - version of the API""" + version of the API. + """ pass @@ -33,7 +34,8 @@ class NoUniqueMatch(Exception): class NoTokenLookupException(Exception): """This form of authentication does not support looking up - endpoints from an existing token.""" + endpoints from an existing token. + """ pass |