Fix H405 errors in tackerclient code

This Patch fixes all H405 errors and enables this test.
[H405] Multi line docstring summary not separated with an empty line

Change-Id: I93a9f477f27c259bbfed20ff93105e63d5f6f82c
Related-Bug: 1516045
This commit is contained in:
Martin Oemke 2015-12-23 21:58:46 +01:00
parent ca1ad7c930
commit 0820bb1a10
7 changed files with 21 additions and 15 deletions

@ -221,7 +221,9 @@ class CommandError(TackerCLIError):
class UnsupportedVersion(TackerCLIError):
"""Indicates that the user is trying to use an unsupported version of
"""Unsupported Version.
Indicates that the user is trying to use an unsupported version of
the API.
"""
pass

@ -134,11 +134,12 @@ COMMANDS = {'1.0': COMMAND_V1}
class HelpAction(argparse.Action):
"""Provide a custom action so the -h and --help options
to the main app will print a list of the commands.
"""Provides a custom action for the -h and --help options.
The commands are determined by checking the CommandManager
instance, passed in as the "default" value for the action.
:returns: a list of the commands
"""
def __call__(self, parser, namespace, values, option_string=None):
outputs = []
@ -555,7 +556,9 @@ class TackerShell(app.App):
return 1
def authenticate_user(self):
"""Make sure the user has provided all of the authentication
"""Authentication validation.
Make sure the user has provided all of the authentication
info we need.
"""
if self.options.os_auth_strategy == 'keystone':

@ -26,8 +26,8 @@ API_VERSIONS = {
def make_client(instance):
"""Returns an tacker client.
"""
"""Returns an tacker client."""
tacker_client = utils.get_client_class(
API_NAME,
instance._api_version[API_NAME],
@ -61,7 +61,8 @@ def make_client(instance):
def Client(api_version, *args, **kwargs):
"""Return an tacker client.
@param api_version: only 1.0 is supported now
:param api_version: only 1.0 is supported now
"""
tacker_client = utils.get_client_class(
API_NAME,

@ -452,8 +452,7 @@ class CreateCommand(TackerCommand, show.ShowOne):
class UpdateCommand(TackerCommand):
"""Update resource's information
"""
"""Update resource's information."""
api = 'servicevm'
resource = None

@ -127,8 +127,10 @@ class CLITestAuthKeystone(testtools.TestCase):
self.addCleanup(self.mox.UnsetStubs)
def test_reused_token_get_auth_info(self):
"""Test that Client.get_auth_info() works even if client was
instantiated with predefined token.
"""Test Client.get_auth_info().
Test that Client.get_auth_info() works even if client was
instantiated with predefined token.
"""
client_ = client.HTTPClient(username=USERNAME,
tenant_name=TENANT_NAME,

@ -87,8 +87,8 @@ def exception_handler_v10(status_code, error_content):
class APIParamsCall(object):
"""A Decorator to add support for format and tenant overriding and filters.
"""
"""A Decorator to support formating and tenant overriding and filters."""
def __init__(self, function):
self.function = function

@ -27,8 +27,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
[flake8]
# E125 continuation line does not distinguish itself from next logical line
# H302 import only modules
# H405 multi line docstring summary not separated with an empty line
# H238 old style class declaration, use new style (inherit from `object`)
ignore = E125,H302,H405,H238
ignore = E125,H302,H238
show-source = true
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools