docs(python): fix duplicated headings on layers and types API pages#7880
Merged
chitralverma merged 2 commits intoJul 7, 2026
Merged
Conversation
The layers and types API pages put a manual Markdown heading before each mkdocstrings block, while mkdocstrings also renders its own heading for the class. That produced two headings (and two table-of-contents entries) per class. Drop the redundant manual headings so each class renders once, matching the single-class API pages.
There was a problem hiding this comment.
Pull request overview
This PR fixes duplicated headings in the Python API documentation pages for layers and types by removing manual Markdown ## <Name> headings and relying on mkdocstrings to render a single heading per documented class/type.
Changes:
- Removed redundant manual
##headings before mkdocstrings blocks indocs/api/layers.md. - Removed redundant manual
##headings before mkdocstrings blocks indocs/api/types.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| bindings/python/docs/api/types.md | Removes manual ## headings so mkdocstrings produces a single heading/ToC entry per type. |
| bindings/python/docs/api/layers.md | Removes manual ## headings so mkdocstrings produces a single heading/ToC entry per layer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
erickguan
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
No tracking issue.
Rationale for this change
The layers and types API pages render each class twice. Each entry has a manual Markdown
## <Name>heading before the mkdocstrings block, and mkdocstrings also renders its own heading for the class, producing two headings (and two table-of-contents entries) per class. The single-class pages (e.g.operator.md) omit the manual heading and render once.What changes are included in this PR?
Remove the redundant manual
## <Name>headings fromdocs/api/layers.mdanddocs/api/types.mdso each class renders a single heading via mkdocstrings.Are there any user-facing changes?
Docs only. Each class now appears once on its API page.
AI Usage Statement
Implemented with an AI coding agent (opencode, Claude Opus). Validated with
mkdocs build.