Skip to content

[docs] add missing Returns sections to forward/__call__ docstrings#13830

Merged
sayakpaul merged 1 commit into
huggingface:follow-ups-consistent-forward-docstringsfrom
stevhliu:more-forward-fixes
May 29, 2026
Merged

[docs] add missing Returns sections to forward/__call__ docstrings#13830
sayakpaul merged 1 commit into
huggingface:follow-ups-consistent-forward-docstringsfrom
stevhliu:more-forward-fixes

Conversation

@stevhliu
Copy link
Copy Markdown
Member

@stevhliu stevhliu commented May 29, 2026

follow up to #13779

Adds a Returns: section to the 43 model forward() and pipeline __call__()
methods flagged by utils/check_forward_call_docstrings.py, which requires a
Returns: section whenever the method has a non-None return annotation.

Descriptions reflect the actual return statements (Output dataclass when
return_dict=True, plain tuple otherwise; bare tensors / lists where
applicable) and reuse each file's existing doc-builder link form. Also
reformats a malformed single-line Returns: in pipeline_aura_flow.py that the
check could not detect.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added models pipelines size/L PR with diff > 200 LOC labels May 29, 2026
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@stevhliu stevhliu requested a review from sayakpaul May 29, 2026 00:48
@sayakpaul sayakpaul merged commit 379f134 into huggingface:follow-ups-consistent-forward-docstrings May 29, 2026
6 checks passed
sayakpaul added a commit that referenced this pull request May 29, 2026
* feat: allow docstring checker to fix unused args in docstrings.

* feat: check for returns, too.

* [docs] add missing Returns sections to forward/__call__ docstrings (#13830)

Adds a Returns: section to the 43 model forward() and pipeline __call__()
methods flagged by utils/check_forward_call_docstrings.py, which requires a
Returns: section whenever the method has a non-None return annotation.

Descriptions reflect the actual return statements (Output dataclass when
return_dict=True, plain tuple otherwise; bare tensors / lists where
applicable) and reuse each file's existing doc-builder link form. Also
reformats a malformed single-line Returns: in pipeline_aura_flow.py that the
check could not detect.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

* Apply style fixes

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models pipelines size/L PR with diff > 200 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants