Fix for PEP8 violation - D202
(No blank lines allowed after function docstring.) Change-Id: Ice629f0ef8b1431f0c4655ff37efe0cd5e9c86ec
This commit is contained in:
parent
80b58cc2f2
commit
7d448dbc55
@ -195,7 +195,6 @@ class Adapter(object):
|
||||
:type parser: argparse.ArgumentParser
|
||||
:param str service_type: Default service_type value. (optional)
|
||||
"""
|
||||
|
||||
adapter_group = parser.add_argument_group(
|
||||
'Service Options',
|
||||
'Options controlling the specialization of the API'
|
||||
|
@ -72,7 +72,6 @@ def get_version_data(session, url, authenticated=None):
|
||||
|
||||
def normalize_version_number(version):
|
||||
"""Turn a version representation into a tuple."""
|
||||
|
||||
# trim the v from a 'v2.0' or similar
|
||||
try:
|
||||
version = version.lstrip('v')
|
||||
|
@ -73,7 +73,6 @@ class Password(base.BaseSAMLPlugin):
|
||||
:type password: string
|
||||
|
||||
"""
|
||||
|
||||
super(Password, self).__init__(
|
||||
auth_url=auth_url, identity_provider=identity_provider,
|
||||
identity_provider_url=identity_provider_url,
|
||||
@ -117,7 +116,6 @@ class Password(base.BaseSAMLPlugin):
|
||||
:type fmt: string
|
||||
|
||||
"""
|
||||
|
||||
date_created = datetime.datetime.utcnow()
|
||||
date_expires = date_created + datetime.timedelta(
|
||||
seconds=self.DEFAULT_ADFS_TOKEN_EXPIRATION)
|
||||
@ -129,7 +127,6 @@ class Password(base.BaseSAMLPlugin):
|
||||
Some values like username or password are inserted in the request.
|
||||
|
||||
"""
|
||||
|
||||
WSS_SECURITY_NAMESPACE = {
|
||||
'o': ('http://docs.oasis-open.org/wss/2004/01/oasis-200401-'
|
||||
'wss-wssecurity-secext-1.0.xsd')
|
||||
|
@ -199,7 +199,6 @@ class Password(base.BaseSAMLPlugin):
|
||||
|
||||
def _send_idp_saml2_authn_request(self, session):
|
||||
"""Present modified SAML2 authn assertion from the Service Provider."""
|
||||
|
||||
self._prepare_idp_saml2_request(self.saml2_authn_request)
|
||||
idp_saml2_authn_request = self.saml2_authn_request
|
||||
|
||||
|
@ -140,7 +140,6 @@ class Keystone2Keystone(federation._Rescoped):
|
||||
:type sp_auth_url: str
|
||||
|
||||
"""
|
||||
|
||||
response = session.post(
|
||||
sp_url,
|
||||
headers={'Content-Type': 'application/vnd.paos+xml'},
|
||||
|
@ -183,7 +183,6 @@ class OidcPassword(_OidcBase):
|
||||
:returns: a token data representation
|
||||
:rtype: :py:class:`keystoneauth1.access.AccessInfoV3`
|
||||
"""
|
||||
|
||||
# get an access token
|
||||
client_auth = (self.client_id, self.client_secret)
|
||||
payload = {'grant_type': self.grant_type, 'username': self.username,
|
||||
@ -250,7 +249,6 @@ class OidcAuthorizationCode(_OidcBase):
|
||||
:returns: a token data representation
|
||||
:rtype: :py:class:`keystoneauth1.access.AccessInfoV3`
|
||||
"""
|
||||
|
||||
# get an access token
|
||||
client_auth = (self.client_id, self.client_secret)
|
||||
payload = {'grant_type': self.grant_type,
|
||||
|
@ -362,7 +362,6 @@ class Session(object):
|
||||
|
||||
:returns: The response to the request.
|
||||
"""
|
||||
|
||||
headers = kwargs.setdefault('headers', dict())
|
||||
|
||||
if authenticated is None:
|
||||
|
@ -82,7 +82,6 @@ class AuthenticateviaADFSTests(utils.TestCase):
|
||||
|
||||
def test_get_adfs_security_token(self):
|
||||
"""Test ADFSPassword._get_adfs_security_token()."""
|
||||
|
||||
self.requests_mock.post(
|
||||
self.IDENTITY_PROVIDER_URL,
|
||||
content=utils.make_oneline(self.ADFS_SECURITY_TOKEN_RESPONSE),
|
||||
|
@ -68,7 +68,6 @@ class OIDCPasswordTests(AuthenticateOIDCTests):
|
||||
|
||||
def test_initial_call_to_get_access_token(self):
|
||||
"""Test initial call, expect JSON access token."""
|
||||
|
||||
# Mock the output that creates the access token
|
||||
self.requests_mock.post(
|
||||
self.ACCESS_TOKEN_ENDPOINT,
|
||||
@ -93,7 +92,6 @@ class OIDCPasswordTests(AuthenticateOIDCTests):
|
||||
|
||||
def test_second_call_to_protected_url(self):
|
||||
"""Test subsequent call, expect Keystone token."""
|
||||
|
||||
# Mock the output that creates the keystone token
|
||||
self.requests_mock.post(
|
||||
self.FEDERATION_AUTH_URL,
|
||||
@ -115,7 +113,6 @@ class OIDCPasswordTests(AuthenticateOIDCTests):
|
||||
|
||||
def test_end_to_end_workflow(self):
|
||||
"""Test full OpenID Connect workflow."""
|
||||
|
||||
# Mock the output that creates the access token
|
||||
self.requests_mock.post(
|
||||
self.ACCESS_TOKEN_ENDPOINT,
|
||||
@ -135,7 +132,6 @@ class OIDCAuthorizationGrantTests(AuthenticateOIDCTests):
|
||||
|
||||
def test_initial_call_to_get_access_token(self):
|
||||
"""Test initial call, expect JSON access token."""
|
||||
|
||||
# Mock the output that creates the access token
|
||||
self.requests_mock.post(
|
||||
self.ACCESS_TOKEN_ENDPOINT,
|
||||
|
@ -41,7 +41,6 @@ class XMLEquals(object):
|
||||
different children.
|
||||
|
||||
"""
|
||||
|
||||
if expected_doc.tag != observed_doc.tag:
|
||||
return False
|
||||
|
||||
|
@ -176,7 +176,6 @@ class SessionTests(utils.TestCase):
|
||||
|
||||
def test_logs_failed_output(self):
|
||||
"""Test that output is logged even for failed requests"""
|
||||
|
||||
session = client_session.Session()
|
||||
body = uuid.uuid4().hex
|
||||
|
||||
|
3
tox.ini
3
tox.ini
@ -37,7 +37,6 @@ commands = oslo_debug_helper -t keystoneauth1/tests {posargs}
|
||||
# D104: Missing docstring in public package
|
||||
# D105: Missing docstring in magic method
|
||||
# D200: One-line docstring should fit on one line with quotes
|
||||
# D202: No blank lines allowed after function docstring
|
||||
# D203: 1 blank required before class docstring.
|
||||
# D204: 1 blank required after class docstring
|
||||
# D205: Blank line required between one-line summary and description.
|
||||
@ -46,7 +45,7 @@ commands = oslo_debug_helper -t keystoneauth1/tests {posargs}
|
||||
# D301: Use r”“” if any backslashes in a docstring
|
||||
# D400: First line should end with a period.
|
||||
# D401: First line should be in imperative mood.
|
||||
ignore = H405,D100,D101,D102,D103,D104,D105,D200,D202,D203,D204,D205,D208,D211,D301,D400,D401
|
||||
ignore = H405,D100,D101,D102,D103,D104,D105,D200,D203,D204,D205,D208,D211,D301,D400,D401
|
||||
show-source = True
|
||||
exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user