Fixing D301 PEP257 violation.

Currently tox ignores D301.
D301: Use r”“” if any backslashes in adocstring.
This change removes D301 ignore and fix violations.

Change-Id: I9dbe2c9d59e2c2d8585a53840a579a9b9c57a09c
This commit is contained in:
Navid Pustchi
2016-05-02 16:29:24 +00:00
parent a4ca83b840
commit a7b65bed8f
5 changed files with 5 additions and 6 deletions

View File

@@ -184,7 +184,7 @@ class OidcPassword(federated.FederatedBaseAuth):
return op_response
def _get_keystone_token(self, session, headers, federated_token_url):
"""Exchange an acess token for a keystone token.
r"""Exchange an acess token for a keystone token.
By Sending the access token in an `Authorization: Bearer` header, to
an OpenID Connect protected endpoint (Federated Token URL). The

View File

@@ -88,7 +88,7 @@ class Saml2UnscopedTokenAuthMethod(v3.AuthMethod):
class Saml2UnscopedToken(_BaseSAMLPlugin):
"""Implement authentication plugin for SAML2 protocol.
r"""Implement authentication plugin for SAML2 protocol.
ECP stands for `Enhanced Client or Proxy` and is a SAML2 extension
for federated authentication where a transportation layer consists of

View File

@@ -75,7 +75,7 @@ class TestCase(testtools.TestCase):
self.assertEqual(body, last_request_body)
def assertQueryStringIs(self, qs=''):
"""Verify the QueryString matches what is expected.
r"""Verify the QueryString matches what is expected.
The qs parameter should be of the format \'foo=bar&abc=xyz\'
"""

View File

@@ -48,7 +48,7 @@ _logger = logging.getLogger(__name__)
class Client(httpclient.HTTPClient):
"""Client for the OpenStack Identity API v3.
r"""Client for the OpenStack Identity API v3.
:param session: Session for requests. (optional)
:type session: keystoneauth1.session.Session

View File

@@ -54,8 +54,7 @@ passenv = OS_*
# D207: Docstring is under-indented
# D208: Docstring is over-indented
# D211: No blank lines allowed before class docstring
# D301: Use r”“” if any backslashes in a docstring
ignore = D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D207,D208,D211,D301
ignore = D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D207,D208,D211
show-source = True
exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*