Repository navigation
[rllib] Hand-fix the four D212 docstrings the auto-fix would mis-render - #67625
Merged
Merged
Conversation
Give each docstring a summary on the opening quotes and keep the existing material below it, so the D212 rule can be turned on without changing what these docstrings render as. MultiAgentBatch.size_bytes had only a Returns: block and now has a summary line. The two multi_head_attention module docstrings and the RL Unplugged Atari Pong BC benchmark's module docstring each get a summary above their existing citation or schema block, which keeps its original indentation. @rtd-build Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
pseudo-rnd-thoughts
approved these changes
Nov 3, 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.
Why are these changes needed?
#67538 applied ruff's
D212,D200, andD210auto-fixes topython/ray/rllib/. It left fourD212violations in place because the auto-fix would change what they render as. This PR fixes them by hand so a later config PR can turn onD212.Each docstring now has a summary on the opening quotes, with the existing material kept below it unchanged:
policy/sample_batch.pyMultiAgentBatch.size_byteshad only aReturns:block. It now opens with a summary line that mirrorsSampleBatch.size_bytes.models/tf/layers/multi_head_attention.pyandmodels/torch/modules/multi_head_attention.pymodule docstrings get a summary above the existing hanging-indent citation.examples/algorithms/bc/benchmark_rlunplugged_atari_pong_bc.pymodule docstring gets a summary and a lead-in above the existingschema={block, which keeps its original indentation.For each docstring, the text
ast.get_docstringreturns before this change is an exact suffix of the text it returns after, so the only rendered change is the added summary.Testing
uvx [email protected] check --select D212 --config 'lint.pydocstyle.convention="google"'on the four changed files: all checks passed.python ci/ray_ci/doc/check_docstring_only.py --base upstream/master:docstring-only guard: 4 file(s), docstrings only.pre-commit run --from-ref upstream/master --to-ref HEAD, including ruff, black, pydoclint, and the docstyle hook: passed.No open PR covers these docstrings.
gh pr list --search "D212 rllib"returns only the core-tree PR #67540.AI assistance (Claude Code) was used to prepare this PR.
🤖 Generated with Claude Code