Fix docstring formatting issues causing Sphinx autodoc warnings#46596
Merged
stevhliu merged 1 commit intoJun 12, 2026
Merged
Conversation
These formatting problems appear as warnings when building the huggingface/sentence-transformers docs. That project uses the `TrainingArguments` class and uses the autodoc Sphinx extension for doc builds, which subsequently throws the warnings about the docstring. Here is a representative warning: ``` sentence_transformers/base/training_args.py: docstring of transformers.training_args.TrainingArguments.set_push_to_hub:20: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils] ``` This commit is a whitespace-only fix. It was tested against the huggingface/sentence-transformers docs builds to confirm that the warnings in that project were resolved.
531c758 to
fad2e5b
Compare
Contributor
|
CI Dashboard: View test results in Grafana |
Member
|
As a bit of extra context for transformers reviewers, Sentence Transformers inherits a lot of docstrings from transformers, but ST uses Sphinx instead of (The docs for this PR haven't built yet, so I'm actually not sure if cc @stevhliu
|
stevhliu
approved these changes
Jun 12, 2026
Member
|
Thanks for the merge! P.s. I thought there used to be an automatic docs build for every PR, do we not do that anymore?
|
Member
|
we still do that, but i think for this PR, there was a token issue so the bot couldn't post a comment with the preview link |
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.

What does this PR do?
Note
This was handwritten and tested by me, a human (I read your CONTRIBUTING doc.)
Tagging @tomaarsen, as this is related to doc build fixes I'm doing in the huggingface/sentence-transformers repo that he's been reviewing.
These formatting problems appear as warnings when building the huggingface/sentence-transformers docs. That project uses the
TrainingArgumentsclass and uses the autodoc Sphinx extension for doc builds, which subsequently throws the warnings about the docstring.Here is a representative warning:
This commit is a whitespace-only fix. It was tested against the huggingface/sentence-transformers docs builds to confirm that the warnings in that project were resolved.
Code Agent Policy
The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result,
we ask that new users do not submit pure code agent PRs at this time.
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.
PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously.
This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result,
this policy is likely to be updated regularly in the near future. For more information, please read
CONTRIBUTING.md.Before submitting
☝️ NOTE: I DO NOT SEE THAT SECTION IN THE CONTRIBUTING DOC! THIS LINK MAY BE OUTDATED!
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.