From a7b65bed8f36fe80eda4526ad24ef0cfee5d462c Mon Sep 17 00:00:00 2001 From: Navid Pustchi Date: Mon, 2 May 2016 16:29:24 +0000 Subject: Fixing D301 PEP257 violation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently tox ignores D301. D301: Use r”“” if any backslashes in adocstring. This change removes D301 ignore and fix violations. Change-Id: I9dbe2c9d59e2c2d8585a53840a579a9b9c57a09c --- keystoneclient/contrib/auth/v3/oidc.py | 2 +- keystoneclient/contrib/auth/v3/saml2.py | 2 +- keystoneclient/tests/unit/utils.py | 2 +- keystoneclient/v3/client.py | 2 +- tox.ini | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/keystoneclient/contrib/auth/v3/oidc.py b/keystoneclient/contrib/auth/v3/oidc.py index fc3a356..3c9f6d9 100644 --- a/keystoneclient/contrib/auth/v3/oidc.py +++ b/keystoneclient/contrib/auth/v3/oidc.py @@ -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 diff --git a/keystoneclient/contrib/auth/v3/saml2.py b/keystoneclient/contrib/auth/v3/saml2.py index bc8f11e..a519458 100644 --- a/keystoneclient/contrib/auth/v3/saml2.py +++ b/keystoneclient/contrib/auth/v3/saml2.py @@ -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 diff --git a/keystoneclient/tests/unit/utils.py b/keystoneclient/tests/unit/utils.py index ffed859..c0e9aab 100644 --- a/keystoneclient/tests/unit/utils.py +++ b/keystoneclient/tests/unit/utils.py @@ -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\' """ diff --git a/keystoneclient/v3/client.py b/keystoneclient/v3/client.py index 9ee14fa..d3b2a24 100644 --- a/keystoneclient/v3/client.py +++ b/keystoneclient/v3/client.py @@ -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 diff --git a/tox.ini b/tox.ini index 9152b11..be6a529 100644 --- a/tox.ini +++ b/tox.ini @@ -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* -- cgit v1.2.1