mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9115df2895
commit
2be7442dd5
9 changed files with 26 additions and 48 deletions
|
|
@ -87,8 +87,7 @@ def create_html_for_group(group_data, index):
|
|||
|
||||
score_class = get_score_class(score)
|
||||
item_id = f"group-{index}-item-{i}"
|
||||
items_html += textwrap.dedent(
|
||||
f"""\
|
||||
items_html += textwrap.dedent(f"""\
|
||||
<div class="item {score_class}" id="{item_id}">
|
||||
<h4>Content {i}</h4>
|
||||
<div class="content-block">
|
||||
|
|
@ -96,8 +95,7 @@ def create_html_for_group(group_data, index):
|
|||
</div>
|
||||
<p><strong>Reward:</strong> {html.escape(str(score))}</p>
|
||||
</div>
|
||||
"""
|
||||
)
|
||||
""")
|
||||
|
||||
if not items_html:
|
||||
# Handle case where after length correction, there are no items
|
||||
|
|
@ -108,16 +106,14 @@ def create_html_for_group(group_data, index):
|
|||
return "" # Skip this group entirely in the output
|
||||
|
||||
# Use <details> and <summary> for native collapsibility
|
||||
group_html = textwrap.dedent(
|
||||
f"""\
|
||||
group_html = textwrap.dedent(f"""\
|
||||
<details>
|
||||
<summary>Group {index}</summary>
|
||||
<div class="group-content">
|
||||
{items_html}
|
||||
</div>
|
||||
</details>
|
||||
"""
|
||||
)
|
||||
""")
|
||||
return group_html
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue