Fixing D208 PEP257 violation.

Currently tox ignores D208.
D208: Docstring is over-indented.
This change removes D208 ignore and fix violations.

Change-Id: Ifec21c7602468b2a60727b64d27e7f14d765638c
This commit is contained in:
Navid Pustchi
2016-05-02 16:46:38 +00:00
parent 212cb141b8
commit e9471bdf4c
3 changed files with 23 additions and 26 deletions

View File

@@ -22,13 +22,13 @@ OPENSTACK_CLOUDS = ('functional_admin', 'devstack-admin', 'envvars')
def get_client(version): def get_client(version):
"""Create a keystoneclient instance to run functional tests. """Create a keystoneclient instance to run functional tests.
The client is instantiated via os-client-config either based on a The client is instantiated via os-client-config either based on a
clouds.yaml config file or from the environment variables. clouds.yaml config file or from the environment variables.
First, look for a 'functional_admin' cloud, as this is a cloud that the First, look for a 'functional_admin' cloud, as this is a cloud that the
user may have defined for functional testing with admin credentials. If user may have defined for functional testing with admin credentials. If
that is not found, check for the 'devstack-admin' cloud. Finally, fall that is not found, check for the 'devstack-admin' cloud. Finally, fall
back to looking for environment variables. back to looking for environment variables.
""" """
for cloud in OPENSTACK_CLOUDS: for cloud in OPENSTACK_CLOUDS:

View File

@@ -20,10 +20,10 @@ class Region(base.Resource):
* id: a string that identifies the region. * id: a string that identifies the region.
* description: a string that describes the region. Optional. * description: a string that describes the region. Optional.
* parent_region_id: string that is the id field for a pre-existing * parent_region_id: string that is the id field for a pre-existing
region in the backend. Allows for hierarchical region region in the backend. Allows for hierarchical
organization region organization.
* enabled: determines whether the endpoint appears in the catalog. * enabled: determines whether the endpoint appears in the catalog.
Defaults to True Defaults to True
""" """
pass pass
@@ -38,14 +38,13 @@ class RegionManager(base.CrudManager):
parent_region=None, **kwargs): parent_region=None, **kwargs):
"""Create a Catalog region. """Create a Catalog region.
:param id: a string that identifies the region. If not specified :param id: a string that identifies the region. If not specified a
a unique identifier will be assigned to the region. unique identifier will be assigned to the region.
:param description: a string that describes the region. :param description: a string that describes the region.
:param parent_region: string that is the id field for a :param parent_region: string that is the id field for a pre-existing
pre-existing region in the backend. Allows for hierarchical region in the backend. Allows for hierarchical
region organization. region organization.
:param enabled: determines whether the endpoint appears in the :param enabled: determines whether the endpoint appears in the catalog.
catalog.
""" """
return super(RegionManager, self).create( return super(RegionManager, self).create(
@@ -69,13 +68,12 @@ class RegionManager(base.CrudManager):
parent_region=None, **kwargs): parent_region=None, **kwargs):
"""Update a Catalog region. """Update a Catalog region.
:param region: a string that identifies the region. :param region: a string that identifies the region.
:param description: a string that describes the region. :param description: a string that describes the region.
:param parent_region: string that is the id field for a :param parent_region: string that is the id field for a pre-existing
pre-existing region in the backend. Allows for hierarchical region in the backend. Allows for hierarchical
region organization. region organization.
:param enabled: determines whether the endpoint appears in the :param enabled: determines whether the endpoint appears in the catalog.
catalog.
""" """
return super(RegionManager, self).update( return super(RegionManager, self).update(

View File

@@ -52,8 +52,7 @@ passenv = OS_*
# D204: 1 blank required after class docstring # D204: 1 blank required after class docstring
# D205: Blank line required between one-line summary and description. # D205: Blank line required between one-line summary and description.
# D207: Docstring is under-indented # D207: Docstring is under-indented
# D208: Docstring is over-indented ignore = D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D207
ignore = D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D207,D208
show-source = True show-source = True
exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common* exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*