Add hacking as test requirement
Change-Id: I8e162785abb153bacf06cebc42b8035f6a0176fc
This commit is contained in:
parent
59be51266d
commit
111fab60b4
13
monclient.py
13
monclient.py
|
@ -1,8 +1,9 @@
|
|||
from ceilometer.monclient import client
|
||||
from ceilometer import publisher
|
||||
import time
|
||||
import calendar
|
||||
import time
|
||||
|
||||
from ceilometer.monclient import client
|
||||
from ceilometer.openstack.common import log
|
||||
from ceilometer import publisher
|
||||
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
@ -48,8 +49,7 @@ class monclient(publisher.PublisherBase):
|
|||
self.metrics = mon_client.metrics
|
||||
|
||||
def publish_samples(self, context, samples):
|
||||
"""Main method called to publish samples.
|
||||
"""
|
||||
"""Main method called to publish samples."""
|
||||
|
||||
for sample in samples:
|
||||
dimensions = {}
|
||||
|
@ -76,7 +76,8 @@ class monclient(publisher.PublisherBase):
|
|||
|
||||
def _traverse_dict(self, dimensions, name_prefix, meta_dict):
|
||||
"""Method to add values of a dictionary to another dictionary.
|
||||
Handles nested dictionaries.
|
||||
|
||||
Nested dictionaries are handled.
|
||||
"""
|
||||
|
||||
for name, value in meta_dict.iteritems():
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
pep8
|
||||
flake8
|
||||
hacking>=0.9.2,<0.10
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -17,7 +17,9 @@ downloadcache = ~/cache/pip
|
|||
|
||||
[flake8]
|
||||
show-source = True
|
||||
# H302: Do not import objects, only modules
|
||||
ignore = H302,H803
|
||||
# H302 Do not import objects, only modules
|
||||
# H803 git commit title should not end with period
|
||||
# H904 Wrap long lines in parentheses instead of a backslash
|
||||
ignore = H302,H803,H904
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,client_api_example.py,*openstack/common*,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue