Skip to content

Commit

Permalink
chore(build): adjust changelog reference
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Dec 23, 2024
1 parent 1c99543 commit 279b117
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ share/python-wheels/
*.egg
MANIFEST
tmp/

docs-build/
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
12 changes: 6 additions & 6 deletions tools/sphinx_ext/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
if TYPE_CHECKING:
from sphinx.application import Sphinx

_GH_BASE_URL = "https://github.com/litestar-org/litestar-inertia"
_GH_BASE_URL = "https://github.com/litestar-org/litestar-vite"


def _parse_gh_reference(raw: str, type_: Literal["issues", "pull"]) -> list[str]:
Expand Down Expand Up @@ -43,7 +43,7 @@ def run(self) -> list[nodes.Node]:
change_node = nodes.container("\n".join(self.content))
change_node.attributes["classes"].append("changelog-change")

self.state.nested_parse(self.content, self.content_offset, change_node)
self.state.nested_parse(self.content, self.content_offset, change_node) # pyright: ignore[reportUnknownMemberType]

reference_links = [
*_parse_gh_reference(self.options.get("issue", ""), "issues"),
Expand Down Expand Up @@ -91,7 +91,7 @@ def run(self) -> list[nodes.Node]:
changelog_node += nodes.strong("", "Released: ")
changelog_node += nodes.Text(release_date)

self.state.nested_parse(self.content, self.content_offset, changelog_node)
self.state.nested_parse(self.content, self.content_offset, changelog_node) # pyright: ignore[reportUnknownMemberType]

change_group_lists = {
"feature": nodes.definition_list(),
Expand Down Expand Up @@ -129,12 +129,12 @@ def run(self) -> list[nodes.Node]:

list_item += nodes.definition("", change_node.children[0])

nodes_to_remove.append(change_node)
nodes_to_remove.append(change_node) # pyright: ignore[reportUnknownMemberType]

change_group_lists[change_type] += list_item

for node in nodes_to_remove:
changelog_node.remove(node)
for node in nodes_to_remove: # pyright: ignore[reportUnknownVariableType]
changelog_node.remove(node) # pyright: ignore[reportUnknownArgumentType]

for change_group_type, change_group_list in change_group_lists.items():
if not change_group_list.children:
Expand Down

0 comments on commit 279b117

Please sign in to comment.