Fix D202: No blank lines allowed after function docstring (PEP257)
Change-Id: I634dc4b1dd8fcbab05958d528888325451e2f930
This commit is contained in:
committed by
Steve Martinelli
parent
c813c35214
commit
ee73f702a3
@@ -330,6 +330,8 @@ class KeystoneCredential(credential.Credential):
|
||||
class PycadfAuditApiConfigError(Exception):
|
||||
"""Error raised when pyCADF fails to configure correctly."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class AuditMiddleware(object):
|
||||
"""Create an audit event based on request/response.
|
||||
@@ -381,7 +383,6 @@ class AuditMiddleware(object):
|
||||
|
||||
if oslo.messaging enabled, send notification. if not, log event.
|
||||
"""
|
||||
|
||||
if messaging:
|
||||
self._notifier.info(context, event_type, payload)
|
||||
else:
|
||||
|
||||
@@ -826,7 +826,6 @@ class AuthProtocol(BaseAuthProtocol):
|
||||
|
||||
:returns: token data if found else None.
|
||||
"""
|
||||
|
||||
for token in token_hashes:
|
||||
cached = self._token_cache.get(token)
|
||||
|
||||
|
||||
@@ -201,7 +201,6 @@ class TokenCache(object):
|
||||
If token is invalid raise exc.InvalidToken
|
||||
return token only if fresh (not expired).
|
||||
"""
|
||||
|
||||
if not token_id:
|
||||
# Nothing to do
|
||||
return
|
||||
|
||||
@@ -78,7 +78,6 @@ class CryptoUnavailableError(Exception):
|
||||
|
||||
def assert_crypto_availability(f):
|
||||
"""Ensure Crypto module is available."""
|
||||
|
||||
@functools.wraps(f)
|
||||
def wrapper(*args, **kwds):
|
||||
if AES is None:
|
||||
|
||||
@@ -51,7 +51,6 @@ class AuthTokenFixture(fixtures.Fixture):
|
||||
project_domain_id=None, project_domain_name=None,
|
||||
role_list=None, is_v2=False):
|
||||
"""Add token data to the auth_token fixture."""
|
||||
|
||||
if not token_id:
|
||||
token_id = uuid.uuid4().hex
|
||||
|
||||
|
||||
@@ -130,7 +130,6 @@ class DisableModuleFixture(fixtures.Fixture):
|
||||
|
||||
def setUp(self):
|
||||
"""Ensure ImportError for the specified module."""
|
||||
|
||||
super(DisableModuleFixture, self).setUp()
|
||||
|
||||
# Clear 'module' references in sys.modules
|
||||
|
||||
3
tox.ini
3
tox.ini
@@ -42,8 +42,7 @@ commands = oslo_debug_helper {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
|
||||
ignore = D100,D101,D102,D103,D104,D105,D200,D202
|
||||
ignore = D100,D101,D102,D103,D104,D105,D200
|
||||
show-source = True
|
||||
exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user