Skip to content

refactor(framework): Align user-facing docstrings with reStructuredText (RST) syntax#6855

Draft
panh99 wants to merge 1 commit intomainfrom
agents-playground
Draft

refactor(framework): Align user-facing docstrings with reStructuredText (RST) syntax#6855
panh99 wants to merge 1 commit intomainfrom
agents-playground

Conversation

@panh99
Copy link
Copy Markdown
Member

@panh99 panh99 commented Mar 26, 2026

Problem

The framework documentation generated via framework/dev/build-docs.sh uses Sphinx, which expects reStructuredText (RST) formatting. However, many docstrings in the codebase are currently written in Markdown syntax. For example, single backticks are used for inline code, which Sphinx interprets as italic text instead of code (RST requires double backticks).

Solution

Update all user-facing docstrings rendered by Sphinx to use RST-compatible syntax, ensuring consistent and correct formatting in the generated documentation. Non user-facing docstrings shall stay unchanged.

@panh99 panh99 requested a review from tanertopal as a code owner March 26, 2026 14:34
Copilot AI review requested due to automatic review settings March 26, 2026 14:34
@panh99 panh99 requested a review from danieljanes as a code owner March 26, 2026 14:34
@panh99 panh99 marked this pull request as draft March 26, 2026 14:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to ensure Sphinx-generated framework documentation renders correctly by updating user-facing docstrings from Markdown-style formatting to reStructuredText (RST)-compatible syntax.

Changes:

  • Updated inline-code formatting in the Array docstring to use RST inline literals (double backticks) for one list item.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +58 to 60
1. By specifying explicit values for ``dtype``, ``shape``, ``stype``, and ``data``.
2. By providing a NumPy ndarray (via the `ndarray` argument).
3. By providing a PyTorch tensor (via the `torch_tensor` argument).
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docstring line was updated to RST inline-literal syntax (double backticks), but the adjacent list items still use Markdown-style single backticks (e.g., ndarray, torch_tensor). Since Sphinx/RST will render single backticks as emphasis, these should be updated to RST inline literals (ndarray, torch_tensor) for consistent user-facing docs output.

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants