Skip to content

Commit dc82f2f

Browse files
committed
fix: use correct template variable for importlinter config and wrap nav under API Reference key
Replace `{{ module_name }}` with `{{ package_name }}` in importlinter root_package and ancestors settings, and wrap the generated navigation structure under an "API Reference" top-level key in ref-pages output.
1 parent e899c06 commit dc82f2f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

mise-tasks/gen/ref-pages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def main() -> None:
9191
full_doc_path.parent.mkdir(parents=True, exist_ok=True)
9292
full_doc_path.write_text(MARKDOWN_TEMPLATE.format(module_path=".".join(parts)))
9393
nav.add(parts, doc_path)
94-
print(tomlkit.dumps(nav.dump()))
94+
print(tomlkit.dumps({"API Reference": nav.dump()}))
9595

9696

9797
if __name__ == "__main__":

template/pyproject.toml.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ packages = ["src/{{ wheel_package_dir }}"]
7474
source = "vcs"
7575

7676
[tool.importlinter]
77-
root_package = "{{ module_name }}"
77+
root_package = "{{ package_name }}"
7878

7979
[[tool.importlinter.contracts]]
80-
ancestors = ["{{ module_name }}"]
80+
ancestors = ["{{ package_name }}"]
8181
name = "Acyclic siblings"
8282
type = "acyclic_siblings"
8383

0 commit comments

Comments
 (0)