Fix flake8 issues

Change-Id: I2d615054b5b3ad3e1ab992a8488e4c10bd86afd7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-09-07 11:11:36 +01:00
parent e392656946
commit 2e3b14a46c
3 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ def prepare_result(value, datatype):
return value return value
if datatype == wsme.types.bytes: if datatype == wsme.types.bytes:
return value.encode('ascii') return value.encode('ascii')
if type(value) != datatype: if type(value) is not datatype:
print(type(value), datatype) print(type(value), datatype)
return datatype(value) return datatype(value)
return value return value

View File

@ -45,7 +45,7 @@ def dumpxml(key, obj, datatype=None):
continue continue
o = obj[name] o = obj[name]
el.append(dumpxml(name, o, attr.datatype)) el.append(dumpxml(name, o, attr.datatype))
elif type(obj) == dict: elif type(obj) is dict:
for name, value in obj.items(): for name, value in obj.items():
el.append(dumpxml(name, value)) el.append(dumpxml(name, value))
print(obj, datatype, et.tostring(el)) print(obj, datatype, et.tostring(el))

View File

@ -191,7 +191,7 @@ class TypeDocumenter(autodoc.ClassDocumenter):
option_spec = dict( option_spec = dict(
autodoc.ClassDocumenter.option_spec, 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, 'samples-slot': check_samples_slot,
}) })