Actually fix lint
This commit is contained in:
parent
c7cc82a9d5
commit
2ed08b5bc2
1 changed files with 4 additions and 4 deletions
|
@ -10,13 +10,13 @@ def parse_item(item, h):
|
|||
item_type = type(item)
|
||||
if item_type is list:
|
||||
if len(item) == 1:
|
||||
return parse_item(item[0], h+1)
|
||||
return parse_item(item[0], h + 1)
|
||||
if len(item) == 0:
|
||||
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:
|
||||
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]:
|
||||
return item
|
||||
|
|
Reference in a new issue