Fix flake8 issues
Change-Id: I2d615054b5b3ad3e1ab992a8488e4c10bd86afd7 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
e392656946
commit
2e3b14a46c
@ -72,7 +72,7 @@ def prepare_result(value, datatype):
|
||||
return value
|
||||
if datatype == wsme.types.bytes:
|
||||
return value.encode('ascii')
|
||||
if type(value) != datatype:
|
||||
if type(value) is not datatype:
|
||||
print(type(value), datatype)
|
||||
return datatype(value)
|
||||
return value
|
||||
|
@ -45,7 +45,7 @@ def dumpxml(key, obj, datatype=None):
|
||||
continue
|
||||
o = obj[name]
|
||||
el.append(dumpxml(name, o, attr.datatype))
|
||||
elif type(obj) == dict:
|
||||
elif type(obj) is dict:
|
||||
for name, value in obj.items():
|
||||
el.append(dumpxml(name, value))
|
||||
print(obj, datatype, et.tostring(el))
|
||||
|
@ -191,7 +191,7 @@ class TypeDocumenter(autodoc.ClassDocumenter):
|
||||
|
||||
option_spec = dict(
|
||||
autodoc.ClassDocumenter.option_spec,
|
||||
**{'protocols': lambda l: [v.strip() for v in l.split(',')],
|
||||
**{'protocols': lambda line: [v.strip() for v in line.split(',')],
|
||||
'samples-slot': check_samples_slot,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user