Skip to content

Fix continuation indentation in Google return descriptions - #14726

Open
Michael-WhiteCapData wants to merge 1 commit into
sphinx-doc:masterfrom
Michael-WhiteCapData:fix/napoleon-return-indentation
Open

Michael-WhiteCapData wants to merge 1 commit into
sphinx-doc:masterfrom
Michael-WhiteCapData:fix/napoleon-return-indentation

Conversation

@Michael-WhiteCapData

Copy link
Copy Markdown

Dedent continuation text after the type and description in Google style Returns sections. Previously, a wrapped description rendered as a definition list instead of a paragraph, with or without inline markup.

Preserves indentation after a blank line so literal blocks retain their existing formatting. Adds cases for plain text, interpreted text, and inline literals.

Fixes #13602.

Validation: all 72 Napoleon tests pass, including the existing return code block test. Targeted mypy, Ruff checks, and formatting pass. The push hook also passed all 20 JavaScript browser specs.

@Michael-WhiteCapData

Michael-WhiteCapData commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

CI follow-up: the standard Python jobs and static checks pass. The Docutils HEAD job reports HTML parsing failures; I reproduced the same mismatched tag: line 139, column 2 on unchanged upstream b04a2101295ac3fb725b16111eda0284b6da4cca with Docutils 35b59ca7d0645e6d7c5581a34b75f6a0feb799cc. The baseline markup subset has 64 failures and 4 passes. The LaTeX job also installs that Docutils development revision and reports the same HTML failure among additional failures.

The Python 3.13t and 3.14t jobs fail in the unchanged test_cfunction expectation: time.asctime reports time_tuple, while the test expects tuple. My available Windows 3.13.15t baseline passes that test, so this is not a claim to have reproduced the hosted 3.13.16 environment locally. I have not exhaustively reproduced every LaTeX job failure.

Additional baseline verification: on unchanged upstream b04a210, Python 3.14.7 on Windows with development Docutils reproduces four representative failures: test_footnote_referred_multiple_times (LaTeX), test_texinfo, test_lineblock, and test_highlight_language_default (doctest). With Docutils 0.22.3, the same selection gives 3 passed and 1 skipped (Texinfo requires an unavailable external tool). This extends the baseline evidence without claiming that every hosted LaTeX failure has been reproduced.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sphinx Napoleon does not parse Google-style docstring with variables in backticks

1 participant