Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Maguire committed Oct 28, 2024
1 parent a767c8b commit 0efcc45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx/ext/autosectionlabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def get_node_depth(node: Node) -> int:
i += 1
return i


def get_node_parents(node: Node) -> list[str]:
parents = []
cur_node = node
Expand All @@ -38,6 +39,7 @@ def get_node_parents(node: Node) -> list[str]:
parents.append(ref_name)
return parents


def register_sections_as_label(app: Sphinx, document: Node) -> None:
domain = app.env.domains.standard_domain
for node in document.findall(nodes.section):
Expand All @@ -55,7 +57,7 @@ def register_sections_as_label(app: Sphinx, document: Node) -> None:
id_array.reverse()
id_array.append(ref_name)
name = nodes.fully_normalize_name(':'.join(id_array))
labelid = make_id(app.env, document, '', '.'.join(id_array))
labelid = make_id(app.env, node.document, '', '.'.join(id_array))
else:
name = nodes.fully_normalize_name(docname + ':' + ref_name)
else:
Expand Down

0 comments on commit 0efcc45

Please sign in to comment.