Enable E112 expected an indented block

Change-Id: Ifc9aac5d4f62fe1d39da91825e9fe31143311316
This commit is contained in:
Aaron Rosen 2014-11-20 00:37:24 -08:00
parent 7560111e9d
commit b5cdbd38fe
2 changed files with 15 additions and 14 deletions

View File

@ -242,19 +242,21 @@ class CeilometerDriver(DataSourceDriver):
if trait['name'] == 'payload': if trait['name'] == 'payload':
t_dict = eval(trait['value']) t_dict = eval(trait['value'])
for s, t in t_dict.items(): for s, t in t_dict.items():
# FIXME(madhumohan): Dictionary items within the payload # FIXME(madhumohan): Dictionary items within
# are handled as additional fields in the payload # the payload are handled as additional fields
# table. Need a better way to handle # in the payload table. Need a better way to
# dictionaries or other structures within payload # handle dictionaries or other structures
# Nested dictionaries in the payload are skipped # within payload Nested dictionaries in the
# Lists within the dictionaries are also ignored # payload are skipped Lists within the
# dictionaries are also ignored
if type(t) == type(dict()): if type(t) == type(dict()):
for n, m in t.items(): for n, m in t.items():
if type(m) != type(dict()) and \ if type(m) != type(dict()) and \
type(m) != type(list()): type(m) != type(list()):
# FIXME(madhumohan): Dirty workaround. A cleaner # FIXME(madhumohan): Dirty
# approach is required to handled None object in # workaround. A cleaner approach
# the data # is required to handled None
# object in the data
if m is None: if m is None:
m = 'None' m = 'None'
row_trait_tuple = \ row_trait_tuple = \
@ -263,9 +265,9 @@ class CeilometerDriver(DataSourceDriver):
row_trait_tuple) row_trait_tuple)
else: else:
if type(t) != type(list()): if type(t) != type(list()):
# FIXME(madhumohan): Dirty workaround. A cleaner # FIXME(madhumohan): Dirty workaround.
# approach is required to handled None object in # A cleaner approach is required to
# the data # handled None object in the data
if t is None: if t is None:
t = 'None' t = 'None'
row_trait_tuple = (trait_id, s, t) row_trait_tuple = (trait_id, s, t)

View File

@ -55,10 +55,9 @@ commands = python setup.py testr --no-parallel --testr-args='test_benchmark {pos
# E113 unexpected indentation # E113 unexpected indentation
# H301 one import per line # H301 one import per line
# H233 Python 3.x incompatible # H233 Python 3.x incompatible
# E112 expected an indented block
show-source = True show-source = True
ignore = E125,E126,E128,E129,E251,E713,F402,F811,F812,H237,H305,H307,H401,H402,H404,H405,H904,H231,E122,H301,H233,E112 ignore = E125,E126,E128,E129,E251,E713,F402,F811,F812,H237,H305,H307,H401,H402,H404,H405,H904,H231,E122,H301,H233
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py