Skip to content

Commit

Permalink
fix: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
clatapie committed Dec 23, 2024
1 parent d97c2bb commit 7590cc9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/pyconverter/xml2py/ast_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,12 +1056,22 @@ def to_rst(self, indent="", max_length=100, links=None, base_url=None, fcache=No
intersection_types = set(NO_RESIZE_LIST).intersection(set(item[1].children_types))
if len(intersection_types) == 0:
initial_indent = indent + " " * 2
rst_item = resize_element_list(rst_item, max_length, initial_indent=initial_indent, subsequent_indent=initial_indent)
rst_item = resize_element_list(
rst_item,
max_length,
initial_indent=initial_indent,
subsequent_indent=initial_indent,
)

else:
initial_indent = indent + " "
subsequent_indent = indent + " " * 2
rst_item = resize_element_list(rst_item, max_length, initial_indent=initial_indent, subsequent_indent=subsequent_indent)
rst_item = resize_element_list(
rst_item,
max_length,
initial_indent=initial_indent,
subsequent_indent=subsequent_indent,
)
active_items.append(rst_item)

return "\n".join(active_items) + "\n"
Expand Down

0 comments on commit 7590cc9

Please sign in to comment.