Actually fix lint

This commit is contained in:
Jake Howard 2017-03-14 20:07:53 +00:00
parent c7cc82a9d5
commit 2ed08b5bc2

View file

@ -10,14 +10,14 @@ def parse_item(item, h):
item_type = type(item) item_type = type(item)
if item_type is list: if item_type is list:
if len(item) == 1: if len(item) == 1:
return parse_item(item[0], h+1) return parse_item(item[0], h + 1)
if len(item) == 0: if len(item) == 0:
return '' return ''
return parse_item('\n'.join(['- ' + str(sub_item) for sub_item in item]), h+1) return parse_item('\n'.join(['- ' + str(sub_item) for sub_item in item]), h + 1)
if item_type is dict: if item_type is dict:
return { return {
"<h{0}>{1}</h{0}>".format(h, key): parse_item(value, h+1) for key, value in item.items() "<h{0}>{1}</h{0}>".format(h, key): parse_item(value, h + 1) for key, value in item.items()
} }
if item_type in [int, float]: if item_type in [int, float]:
return item return item
return markdown.markdown(str(item)) return markdown.markdown(str(item))