Enable pep8 H403 checks

What a better thing to do on a Friday afternoon to chill out before the
week-end?

Change-Id: Ie264d2bff02794d80ddbecb95a6b2ff9a3840d44
This commit is contained in:
Julien Danjou 2013-06-14 17:15:52 +02:00
parent 782a71c012
commit d06dcc69f5
11 changed files with 33 additions and 19 deletions

View File

@ -31,8 +31,10 @@ LOG = log.getLogger(__name__)
class PollingTask(object):
"""Polling task for polling counters and inject into pipeline
A polling task can be invoked periodically or only once"""
"""Polling task for polling counters and inject into pipeline.
A polling task can be invoked periodically or only once.
"""
def __init__(self, agent_manager):
self.manager = agent_manager

View File

@ -43,7 +43,8 @@ class ComputeNotificationBase(plugin.NotificationBase):
@staticmethod
def get_exchange_topics(conf):
"""Return a sequence of ExchangeTopics defining the exchange and
topics to be connected for this plugin."""
topics to be connected for this plugin.
"""
return [
plugin.ExchangeTopics(
exchange=conf.nova_control_exchange,

View File

@ -24,12 +24,12 @@ from ceilometer import plugin
class ComputePollster(plugin.PollsterBase):
"""Base class for plugins that support the polling API on the
compute node."""
"""Base class for plugins that support the polling API on the compute node.
"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def get_counters(self, manager, context):
"""Return a sequence of Counter instances from polling the
resources."""
"""Return a sequence of Counter instances from polling the resources.
"""

View File

@ -40,7 +40,8 @@ class ImageBase(plugin.NotificationBase):
@staticmethod
def get_exchange_topics(conf):
"""Return a sequence of ExchangeTopics defining the exchange and
topics to be connected for this plugin."""
topics to be connected for this plugin.
"""
return [
plugin.ExchangeTopics(
exchange=conf.glance_control_exchange,

View File

@ -57,8 +57,10 @@ class NetworkNotificationBase(plugin.NotificationBase):
@staticmethod
def get_exchange_topics(conf):
"""Return a sequence of ExchangeTopics defining the exchange and
topics to be connected for this plugin."""
"""Return a sequence of ExchangeTopics defining the exchange and topics
to be connected for this plugin.
"""
return [
plugin.ExchangeTopics(
exchange=conf.quantum_control_exchange,

View File

@ -51,7 +51,8 @@ class NotificationBase(PluginBase):
@abc.abstractmethod
def get_event_types(self):
"""Return a sequence of strings defining the event types to be
given to this plugin."""
given to this plugin.
"""
@abc.abstractmethod
def get_exchange_topics(self, conf):
@ -65,7 +66,8 @@ class NotificationBase(PluginBase):
def process_notification(self, message):
"""Return a sequence of Counter instances for the given message.
:param message: Message to process."""
:param message: Message to process.
"""
def notification_to_metadata(self, event):
"""Transform a payload dict to a metadata dict."""
@ -87,5 +89,6 @@ class PollsterBase(PluginBase):
@abc.abstractmethod
def get_counters(self, manager, instance):
"""Return a sequence of Counter instances from polling the
resources."""
"""Return a sequence of Counter instances from polling the resources.
"""

View File

@ -65,5 +65,6 @@ class TransformerBase(object):
"""Flush counters cached previously.
:param context: Passed from the data collector.
:param source: Source of counters that are being published."""
:param source: Source of counters that are being published.
"""
return []

View File

@ -21,7 +21,9 @@ from ceilometer import transformer
class TransformerAccumulator(transformer.TransformerBase):
"""Transformer that accumulates counter until a threshold, and then flush
them out in the wild. """
them out in the wild.
"""
def __init__(self, size=1, **kwargs):
if size >= 1:

View File

@ -49,7 +49,8 @@ class _Base(plugin.NotificationBase):
@staticmethod
def get_exchange_topics(conf):
"""Return a sequence of ExchangeTopics defining the exchange and
topics to be connected for this plugin."""
topics to be connected for this plugin.
"""
return [
plugin.ExchangeTopics(
exchange=conf.cinder_control_exchange,

View File

@ -174,7 +174,8 @@ class TestPostSamples(FunctionalTest):
def test_multiple_samples_some_null_sources(self):
"""Do accept a single post with some null sources
this is a convience feature so you only have to set
one of the sample's source field."""
one of the sample's source field.
"""
s1 = [{'counter_name': 'my_counter_name',
'counter_type': 'gauge',
'counter_unit': 'instance',

View File

@ -40,7 +40,7 @@ deps = -r{toxinidir}/requirements.txt
commands = {posargs}
[flake8]
ignore = E125,F403,H301,H302,H304,H306,H401,H402,H403
ignore = E125,F403,H301,H302,H304,H306,H401,H402
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,nova_tests
show-source = True