Stop ignoring H405 hacking rule in tox

This change is one in the series of changes to
align os-brick with Cinder rules.

- H405 'multi line docstring summary not
        separated with an empty line'

See following for more information:
 https://github.com/openstack-dev/hacking

Change-Id: Id67324c0ef22287d91b49ae11eda094bf73739a1
Signed-off-by: Maciej Kucia <maciej@kucia.net>
changes/53/466553/2
Maciej Kucia 6 years ago
parent 211bda0a04
commit d9ac24d0d2

@ -52,11 +52,13 @@ class VolumeEncryptor(executor.Executor):
@abc.abstractmethod
def attach_volume(self, context, **kwargs):
"""Hook called immediately prior to attaching a volume to an instance.
"""
pass
@abc.abstractmethod
def detach_volume(self, **kwargs):
"""Hook called immediately after detaching a volume from an instance.
"""
pass

@ -102,8 +102,7 @@ class CryptsetupEncryptor(base.VolumeEncryptor):
return binascii.hexlify(key).decode('utf-8')
def _open_volume(self, passphrase, **kwargs):
"""Opens the LUKS partition on the volume using the specified
passphrase.
"""Open the LUKS partition on the volume using passphrase.
:param passphrase: the passphrase used to access the volume
"""
@ -129,6 +128,7 @@ class CryptsetupEncryptor(base.VolumeEncryptor):
def _get_mangled_passphrase(self, key):
"""Convert the raw key into a list of unsigned int's and then a string
"""
# NOTE(lyarwood): This replicates the methods used prior to Newton to
# first encode the passphrase as a list of unsigned int's before
@ -139,8 +139,7 @@ class CryptsetupEncryptor(base.VolumeEncryptor):
return ''.join(hex(x).replace('0x', '') for x in encoded_key)
def attach_volume(self, context, **kwargs):
"""Shadows the device and passes an unencrypted version to the
instance.
"""Shadow the device and pass an unencrypted version to the instance.
Transparent disk encryption is achieved by mounting the volume via
dm-crypt and passing the resulting device to the instance. The

@ -87,8 +87,7 @@ class LuksEncryptor(cryptsetup.CryptsetupEncryptor):
attempts=3)
def _open_volume(self, passphrase, **kwargs):
"""Opens the LUKS partition on the volume using the specified
passphrase.
"""Opens the LUKS partition on the volume using passphrase.
:param passphrase: the passphrase used to access the volume
"""
@ -137,8 +136,7 @@ class LuksEncryptor(cryptsetup.CryptsetupEncryptor):
LOG.debug("%s mangled passphrase successfully replaced", self.dev_path)
def attach_volume(self, context, **kwargs):
"""Shadows the device and passes an unencrypted version to the
instance.
"""Shadow the device and pass an unencrypted version to the instance.
Transparent disk encryption is achieved by mounting the volume via
dm-crypt and passing the resulting device to the instance. The

@ -126,7 +126,9 @@ class LinuxSCSI(executor.Executor):
return True
def remove_multipath_device(self, device):
"""This removes LUNs associated with a multipath device
"""Removes related LUNs and multipath device
This removes LUNs associated with a multipath device
and the multipath device itself.
"""

@ -38,7 +38,9 @@ class WindowsISCSIConnector(win_conn_base.BaseWindowsConnector,
self.validate_initiators()
def validate_initiators(self):
"""Validates the list of requested initiator HBAs to be used
"""Validates the list of requested initiator HBAs
Validates the list of requested initiator HBAs to be used
when establishing iSCSI sessions.
"""
valid_initiator_list = True

@ -66,10 +66,7 @@ class RemoteFsClient(executor.Executor):
return self._mount_base
def _get_hash_str(self, base_str):
"""Return a string that represents hash of base_str
(in a hex format).
"""
"""Return a string that represents hash of base_str (hex format)."""
if isinstance(base_str, six.text_type):
base_str = base_str.encode('utf-8')
return hashlib.md5(base_str).hexdigest()

@ -79,7 +79,9 @@ class LintOutput(object):
@classmethod
def from_msg_to_dict(cls, msg):
"""From the output of pylint msg, to a dict, where each key
"""Converts pytlint message to a unique-error dictionary.
From the output of pylint msg, to a dict, where each key
is a unique error identifier, value is a list of LintOutput
"""
result = {}

@ -78,7 +78,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
show-source = True
ignore = E251,H405,H904
ignore = E251,H904
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
max-complexity=30

Loading…
Cancel
Save