style(website): apply ruff format

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-05-03 12:23:55 +08:00
parent 432a1f4b71
commit 3d99f7336d
4 changed files with 28 additions and 42 deletions
+22 -17
View File
@@ -229,18 +229,22 @@ def _parse_list_entries(
if sub_inline:
sub_link = _find_child(sub_inline, "link")
if sub_link:
also_see.append(AlsoSee(
name=render_inline_text(sub_link.children),
url=_href(sub_link),
))
also_see.append(
AlsoSee(
name=render_inline_text(sub_link.children),
url=_href(sub_link),
)
)
entries.append(ParsedEntry(
name=name,
url=url,
description=desc_html,
also_see=also_see,
subcategory=subcategory,
))
entries.append(
ParsedEntry(
name=name,
url=url,
description=desc_html,
also_see=also_see,
subcategory=subcategory,
)
)
return entries
@@ -275,7 +279,6 @@ def _build_section(name: str, body: list[SyntaxTreeNode]) -> ParsedSection:
)
def _is_bold_marker(node: SyntaxTreeNode) -> str | None:
"""Detect a bold-only paragraph used as a group marker.
@@ -321,11 +324,13 @@ def _parse_grouped_sections(
nonlocal current_group_name, current_group_cats
if current_group_cats:
name = current_group_name or "Other"
groups.append(ParsedGroup(
name=name,
slug=slugify(name),
categories=list(current_group_cats),
))
groups.append(
ParsedGroup(
name=name,
slug=slugify(name),
categories=list(current_group_cats),
)
)
current_group_name = None
current_group_cats = []