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
|
@abc.abstractproperty
|
||||||
def name(self):
|
def name(self):
|
||||||
""" The name of handler """
|
"""The name of handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def version(self):
|
def version(self):
|
||||||
""" The versions of the handler """
|
"""The versions of the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def provider(self):
|
def provider(self):
|
||||||
""" Who created the handler """
|
"""Who created the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def signature(self):
|
def signature(self):
|
||||||
""" Signature of the handler """
|
"""Signature of the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def raise_alarm(self, alarm_uuid, alarm_data):
|
def raise_alarm(self, alarm_uuid, alarm_data):
|
||||||
""" Raise an alarm via the handler """
|
"""Raise an alarm via the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def clear_alarm(self, alarm_uuid):
|
def clear_alarm(self, alarm_uuid):
|
||||||
""" Clear an alarm via the handler """
|
"""Clear an alarm via the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def audit_alarms(self):
|
def audit_alarms(self):
|
||||||
""" Audit alarms via the handler """
|
"""Audit alarms via the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def initialize(self, config_file):
|
def initialize(self, config_file):
|
||||||
""" Initialize the handler """
|
"""Initialize the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def finalize(self):
|
def finalize(self):
|
||||||
""" Finalize the handler """
|
"""Finalize the handler """
|
||||||
pass
|
pass
|
||||||
|
@ -36,7 +36,7 @@ class CatalogBackend(stevedore.named.NamedExtensionManager):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def valid_plugin(plugin):
|
def valid_plugin(plugin):
|
||||||
""" Verify signature of plugin is valid """
|
"""Verify signature of plugin is valid """
|
||||||
if CatalogBackend._signature == plugin.obj.signature:
|
if CatalogBackend._signature == plugin.obj.signature:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@ -46,7 +46,7 @@ class CatalogBackend(stevedore.named.NamedExtensionManager):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def read_vnf_descriptor(self, vnfd_id, vnf_vendor, vnf_version):
|
def read_vnf_descriptor(self, vnfd_id, vnf_vendor, vnf_version):
|
||||||
""" Read a particular vnf descriptor """
|
"""Read a particular vnf descriptor """
|
||||||
vnfd_record = None
|
vnfd_record = None
|
||||||
if self.plugin is not None:
|
if self.plugin is not None:
|
||||||
vnfd_record = self.plugin.obj.read_vnf_descriptor(vnfd_id,
|
vnfd_record = self.plugin.obj.read_vnf_descriptor(vnfd_id,
|
||||||
@ -55,11 +55,11 @@ class CatalogBackend(stevedore.named.NamedExtensionManager):
|
|||||||
return vnfd_record
|
return vnfd_record
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
""" Initialize plugin """
|
"""Initialize plugin """
|
||||||
if self.plugin is not None:
|
if self.plugin is not None:
|
||||||
self.plugin.obj.initialize(self._version)
|
self.plugin.obj.initialize(self._version)
|
||||||
|
|
||||||
def finalize(self):
|
def finalize(self):
|
||||||
""" Finalize plugin """
|
"""Finalize plugin """
|
||||||
if self.plugin is not None:
|
if self.plugin is not None:
|
||||||
self.plugin.obj.finalize()
|
self.plugin.obj.finalize()
|
||||||
|
@ -9,7 +9,7 @@ _catalog_backend = None
|
|||||||
|
|
||||||
|
|
||||||
def read_vnf_descriptor(vnfd_id, vnf_vendor, vnf_version):
|
def read_vnf_descriptor(vnfd_id, vnf_vendor, vnf_version):
|
||||||
""" Read a vnf descriptor """
|
"""Read a vnf descriptor """
|
||||||
if _catalog_backend is not None:
|
if _catalog_backend is not None:
|
||||||
return _catalog_backend.read_vnf_descriptor(vnfd_id, vnf_vendor,
|
return _catalog_backend.read_vnf_descriptor(vnfd_id, vnf_vendor,
|
||||||
vnf_version)
|
vnf_version)
|
||||||
@ -17,12 +17,12 @@ def read_vnf_descriptor(vnfd_id, vnf_vendor, vnf_version):
|
|||||||
|
|
||||||
|
|
||||||
def catalog_initialize(plugin_namespace, plugin_name):
|
def catalog_initialize(plugin_namespace, plugin_name):
|
||||||
""" Catalog Initialize """
|
"""Catalog Initialize """
|
||||||
global _catalog_backend
|
global _catalog_backend
|
||||||
_catalog_backend = CatalogBackend(plugin_namespace, plugin_name)
|
_catalog_backend = CatalogBackend(plugin_namespace, plugin_name)
|
||||||
|
|
||||||
|
|
||||||
def catalog_finalize():
|
def catalog_finalize():
|
||||||
""" Catalog Finalize """
|
"""Catalog Finalize """
|
||||||
global _catalog_backend
|
global _catalog_backend
|
||||||
_catalog_backend = None
|
_catalog_backend = None
|
||||||
|
@ -17,35 +17,35 @@ class CatalogPlugin(object):
|
|||||||
"""
|
"""
|
||||||
@abstractproperty
|
@abstractproperty
|
||||||
def name(self):
|
def name(self):
|
||||||
""" The name of plugin """
|
"""The name of plugin """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@abstractproperty
|
||||||
def version(self):
|
def version(self):
|
||||||
""" The versions of the plugin """
|
"""The versions of the plugin """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@abstractproperty
|
||||||
def provider(self):
|
def provider(self):
|
||||||
""" Vendor created the plugin """
|
"""Vendor created the plugin """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@abstractproperty
|
||||||
def signature(self):
|
def signature(self):
|
||||||
""" Signature of the plugin """
|
"""Signature of the plugin """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def read_vnf_descriptor(self, vnfd_id, vnf_vendor, vnf_version):
|
def read_vnf_descriptor(self, vnfd_id, vnf_vendor, vnf_version):
|
||||||
""" Read a particular vnf descriptor """
|
"""Read a particular vnf descriptor """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def initialize(self, version):
|
def initialize(self, version):
|
||||||
""" Initialize the plugin """
|
"""Initialize the plugin """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def finalize(self):
|
def finalize(self):
|
||||||
""" Finalize the plugin """
|
"""Finalize the plugin """
|
||||||
pass
|
pass
|
||||||
|
@ -14,35 +14,35 @@ class EventLogHandler(object):
|
|||||||
"""
|
"""
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def name(self):
|
def name(self):
|
||||||
""" The name of handler """
|
"""The name of handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def version(self):
|
def version(self):
|
||||||
""" The versions of the handler """
|
"""The versions of the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def provider(self):
|
def provider(self):
|
||||||
""" Who created the handler """
|
"""Who created the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractproperty
|
@abc.abstractproperty
|
||||||
def signature(self):
|
def signature(self):
|
||||||
""" Signature of the handler """
|
"""Signature of the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def log(self, log_data):
|
def log(self, log_data):
|
||||||
""" Log an event via the handler """
|
"""Log an event via the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def initialize(self, config_file):
|
def initialize(self, config_file):
|
||||||
""" Initialize the handler """
|
"""Initialize the handler """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def finalize(self):
|
def finalize(self):
|
||||||
""" Finalize the handler """
|
"""Finalize the handler """
|
||||||
pass
|
pass
|
||||||
|
@ -10,7 +10,7 @@ import functools
|
|||||||
|
|
||||||
|
|
||||||
def syscall_retry_on_interrupt(func, *args):
|
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):
|
for _ in range(0, 5):
|
||||||
try:
|
try:
|
||||||
return func(*args)
|
return func(*args)
|
||||||
|
@ -68,7 +68,6 @@ verbosity=2
|
|||||||
# - hacking codes -
|
# - hacking codes -
|
||||||
# H104: File contains nothing but comments
|
# H104: File contains nothing but comments
|
||||||
# H306: imports not in alphabetical order
|
# 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
|
# H404: multi line docstring should start without a leading new line
|
||||||
# H405: multi line docstring summary not separated with an empty line
|
# H405: multi line docstring summary not separated with an empty line
|
||||||
# H501: Do not use self.__dict__ for string formatting
|
# H501: Do not use self.__dict__ for string formatting
|
||||||
@ -77,7 +76,7 @@ verbosity=2
|
|||||||
# - bugbear codes -
|
# - bugbear codes -
|
||||||
# B007 Loop control variable 'X' not used within the loop body. If this is intended, start the name with an underscore.
|
# 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,
|
ignore = E121,E122,E123,E124,E126,E127,E128,E129,E501,
|
||||||
H104,H306,H401,H404,H405,H501,
|
H104,H306,H404,H405,H501,
|
||||||
F821,
|
F821,
|
||||||
B007
|
B007
|
||||||
# H106 Don’t put vim configuration in source files (off by default).
|
# H106 Don’t put vim configuration in source files (off by default).
|
||||||
|
Loading…
Reference in New Issue
Block a user