Enable Flake8 Docstring Errors

Flake8 currently ignores the following errors:
H401: docstring should not start with a space
H404: multi line docstring should start without a leading new line
H405: multi line docstring summary not separated with an empty line
Enable them for more consistent formatting of docstrings

Change-Id: I385e28e9c6eca3c02a3def51ff64b00b7a63a853
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
This commit is contained in:
Eric Barrett 2019-04-18 09:11:20 -04:00
parent ca74c5401f
commit abd4587682
4 changed files with 7 additions and 9 deletions

View File

@ -15,6 +15,7 @@ LOG = logging.getLogger(__name__)
def osd_pool_set_quota(ceph_api, pool_name, max_bytes=0, max_objects=0):
"""Set the quota for an OSD pool_name
Setting max_bytes or max_objects to 0 will disable that quota param
:param pool_name: OSD pool_name
:param max_bytes: maximum bytes for OSD pool_name
@ -112,6 +113,7 @@ def osd_pool_create(ceph_api, pool_name, pg_num, pgp_num):
def osd_pool_delete(ceph_api, pool_name):
"""Delete an osd pool
:param pool_name: pool name
"""
response, body = ceph_api.osd_pool_delete(

View File

@ -665,7 +665,7 @@ class Monitor(HandleUpgradesMixin):
@staticmethod
def _parse_reason(health):
""" Parse reason strings received from Ceph """
"""Parse reason strings received from Ceph"""
if health['health'] in constants.CEPH_STATUS_CUSTOM:
# Don't parse reason messages that we added
return "Storage Alarm Condition: %(health)s. %(detail)s" % health
@ -864,7 +864,7 @@ class Monitor(HandleUpgradesMixin):
alarm_list[alarm].entity_instance_id)
def _get_current_alarms(self):
""" Retrieve currently raised alarm """
"""Retrieve currently raised alarm"""
self.current_health_alarm = self.service.fm_api.get_fault(
fm_constants.FM_ALARM_ID_STORAGE_CEPH,
self.service.entity_instance_id)

View File

@ -48,9 +48,7 @@ def start_polling():
def handle_exception(exc_type, exc_value, exc_traceback):
"""
Exception handler to log any uncaught exceptions
"""
"""Exception handler to log any uncaught exceptions"""
logging.error("Uncaught exception",
exc_info=(exc_type, exc_value, exc_traceback))
sys.__excepthook__(exc_type, exc_value, exc_traceback)
@ -60,9 +58,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
# CLASSES
###################
class LogMgmtDaemon():
""" Daemon process representation of
the /var/log monitoring program
"""
"""Daemon process representation of the /var/log monitoring program"""
def __init__(self):
# Daemon-specific init
self.stdin_path = '/dev/null'

View File

@ -6,7 +6,7 @@
class ValidateError(Exception):
"""Base class for license validation exceptions."""
"""Base class for license validation exceptions"""
def __init__(self, message=None):
self.message = message