Cleanup pep8 H401 docstring warnings
This is a minor code cleanup task. No longer suppress the following flake8 warning H401 docstring should not start with a space This change only affects docstrings and therefore has no runtime impact. Story: 2004515 Task: 28527 Change-Id: I8b1e22ebdfd9f0400535930de4829635364e2299 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
397e40a89f
commit
29f3a1caaa
@ -14,45 +14,45 @@ class AlarmHandler(object):
|
||||
"""
|
||||
@abc.abstractproperty
|
||||
def name(self):
|
||||
""" The name of handler """
|
||||
"""The name of handler """
|
||||
pass
|
||||
|
||||
@abc.abstractproperty
|
||||
def version(self):
|
||||
""" The versions of the handler """
|
||||
"""The versions of the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractproperty
|
||||
def provider(self):
|
||||
""" Who created the handler """
|
||||
"""Who created the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractproperty
|
||||
def signature(self):
|
||||
""" Signature of the handler """
|
||||
"""Signature of the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def raise_alarm(self, alarm_uuid, alarm_data):
|
||||
""" Raise an alarm via the handler """
|
||||
"""Raise an alarm via the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def clear_alarm(self, alarm_uuid):
|
||||
""" Clear an alarm via the handler """
|
||||
"""Clear an alarm via the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def audit_alarms(self):
|
||||
""" Audit alarms via the handler """
|
||||
"""Audit alarms via the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def initialize(self, config_file):
|
||||
""" Initialize the handler """
|
||||
"""Initialize the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def finalize(self):
|
||||
""" Finalize the handler """
|
||||
"""Finalize the handler """
|
||||
pass
|
||||
|
@ -36,7 +36,7 @@ class CatalogBackend(stevedore.named.NamedExtensionManager):
|
||||
|
||||
@staticmethod
|
||||
def valid_plugin(plugin):
|
||||
""" Verify signature of plugin is valid """
|
||||
"""Verify signature of plugin is valid """
|
||||
if CatalogBackend._signature == plugin.obj.signature:
|
||||
return True
|
||||
else:
|
||||
@ -46,7 +46,7 @@ class CatalogBackend(stevedore.named.NamedExtensionManager):
|
||||
return False
|
||||
|
||||
def read_vnf_descriptor(self, vnfd_id, vnf_vendor, vnf_version):
|
||||
""" Read a particular vnf descriptor """
|
||||
"""Read a particular vnf descriptor """
|
||||
vnfd_record = None
|
||||
if self.plugin is not None:
|
||||
vnfd_record = self.plugin.obj.read_vnf_descriptor(vnfd_id,
|
||||
@ -55,11 +55,11 @@ class CatalogBackend(stevedore.named.NamedExtensionManager):
|
||||
return vnfd_record
|
||||
|
||||
def initialize(self):
|
||||
""" Initialize plugin """
|
||||
"""Initialize plugin """
|
||||
if self.plugin is not None:
|
||||
self.plugin.obj.initialize(self._version)
|
||||
|
||||
def finalize(self):
|
||||
""" Finalize plugin """
|
||||
"""Finalize plugin """
|
||||
if self.plugin is not None:
|
||||
self.plugin.obj.finalize()
|
||||
|
@ -9,7 +9,7 @@ _catalog_backend = None
|
||||
|
||||
|
||||
def read_vnf_descriptor(vnfd_id, vnf_vendor, vnf_version):
|
||||
""" Read a vnf descriptor """
|
||||
"""Read a vnf descriptor """
|
||||
if _catalog_backend is not None:
|
||||
return _catalog_backend.read_vnf_descriptor(vnfd_id, vnf_vendor,
|
||||
vnf_version)
|
||||
@ -17,12 +17,12 @@ def read_vnf_descriptor(vnfd_id, vnf_vendor, vnf_version):
|
||||
|
||||
|
||||
def catalog_initialize(plugin_namespace, plugin_name):
|
||||
""" Catalog Initialize """
|
||||
"""Catalog Initialize """
|
||||
global _catalog_backend
|
||||
_catalog_backend = CatalogBackend(plugin_namespace, plugin_name)
|
||||
|
||||
|
||||
def catalog_finalize():
|
||||
""" Catalog Finalize """
|
||||
"""Catalog Finalize """
|
||||
global _catalog_backend
|
||||
_catalog_backend = None
|
||||
|
@ -17,35 +17,35 @@ class CatalogPlugin(object):
|
||||
"""
|
||||
@abstractproperty
|
||||
def name(self):
|
||||
""" The name of plugin """
|
||||
"""The name of plugin """
|
||||
pass
|
||||
|
||||
@abstractproperty
|
||||
def version(self):
|
||||
""" The versions of the plugin """
|
||||
"""The versions of the plugin """
|
||||
pass
|
||||
|
||||
@abstractproperty
|
||||
def provider(self):
|
||||
""" Vendor created the plugin """
|
||||
"""Vendor created the plugin """
|
||||
pass
|
||||
|
||||
@abstractproperty
|
||||
def signature(self):
|
||||
""" Signature of the plugin """
|
||||
"""Signature of the plugin """
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def read_vnf_descriptor(self, vnfd_id, vnf_vendor, vnf_version):
|
||||
""" Read a particular vnf descriptor """
|
||||
"""Read a particular vnf descriptor """
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def initialize(self, version):
|
||||
""" Initialize the plugin """
|
||||
"""Initialize the plugin """
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def finalize(self):
|
||||
""" Finalize the plugin """
|
||||
"""Finalize the plugin """
|
||||
pass
|
||||
|
@ -14,35 +14,35 @@ class EventLogHandler(object):
|
||||
"""
|
||||
@abc.abstractproperty
|
||||
def name(self):
|
||||
""" The name of handler """
|
||||
"""The name of handler """
|
||||
pass
|
||||
|
||||
@abc.abstractproperty
|
||||
def version(self):
|
||||
""" The versions of the handler """
|
||||
"""The versions of the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractproperty
|
||||
def provider(self):
|
||||
""" Who created the handler """
|
||||
"""Who created the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractproperty
|
||||
def signature(self):
|
||||
""" Signature of the handler """
|
||||
"""Signature of the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def log(self, log_data):
|
||||
""" Log an event via the handler """
|
||||
"""Log an event via the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def initialize(self, config_file):
|
||||
""" Initialize the handler """
|
||||
"""Initialize the handler """
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def finalize(self):
|
||||
""" Finalize the handler """
|
||||
"""Finalize the handler """
|
||||
pass
|
||||
|
@ -10,7 +10,7 @@ import functools
|
||||
|
||||
|
||||
def syscall_retry_on_interrupt(func, *args):
|
||||
""" Attempt system call again if interrupted by EINTR """
|
||||
"""Attempt system call again if interrupted by EINTR """
|
||||
for _ in range(0, 5):
|
||||
try:
|
||||
return func(*args)
|
||||
|
@ -68,7 +68,6 @@ verbosity=2
|
||||
# - hacking codes -
|
||||
# H104: File contains nothing but comments
|
||||
# H306: imports not in alphabetical order
|
||||
# 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
|
||||
# H501: Do not use self.__dict__ for string formatting
|
||||
@ -77,7 +76,7 @@ verbosity=2
|
||||
# - bugbear codes -
|
||||
# B007 Loop control variable 'X' not used within the loop body. If this is intended, start the name with an underscore.
|
||||
ignore = E121,E122,E123,E124,E126,E127,E128,E129,E501,
|
||||
H104,H306,H401,H404,H405,H501,
|
||||
H104,H306,H404,H405,H501,
|
||||
F821,
|
||||
B007
|
||||
# H106 Don’t put vim configuration in source files (off by default).
|
||||
|
Loading…
Reference in New Issue
Block a user