Repository navigation
Python: drop a Returns section from a method that returns None - #10203
Open
Hyacinth-of-Security (lxcxjxhx) wants to merge 3 commits into
Open
Hyacinth-of-Security (lxcxjxhx) wants to merge 3 commits into
Hyacinth-of-Security (lxcxjxhx) wants to merge 3 commits into
Conversation
`restore_from_checkpoint` is annotated `-> None` and never returns a value, so the `Returns: None on success.` block repeats the annotation. Same shape as microsoft#10168.
Hyacinth-of-Security (lxcxjxhx)
temporarily deployed
to
github-app-auth
November 9, 2026 13:50 — with
GitHub Actions
Inactive
Hyacinth-of-Security (lxcxjxhx)
temporarily deployed
to
github-app-auth
November 9, 2026 13:50 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block this documentation-only cleanup of a redundant return-value description.
No open issues 🎉
What changed in this PR
This documentation-only change removes a redundant return-value description from the Python workflow runner, consistent with the cleanup in #10168.
Changes:
- Removes
Returns: None on success.fromRunnerImpl.restore_from_checkpoint. - Preserves the
Args:andRaises:sections; signatures and runtime behavior are unchanged.
| File | Description |
|---|---|
python/packages/core/agent_framework/_workflows/_runner.py |
Removes the redundant Returns: block from the checkpoint restoration docstring. |
Review effort: Balanced
Hyacinth-of-Security (lxcxjxhx)
temporarily deployed
to
github-app-auth
November 10, 2026 00:06 — with
GitHub Actions
Inactive
Hyacinth-of-Security (lxcxjxhx)
temporarily deployed
to
github-app-auth
November 10, 2026 08:17 — with
GitHub Actions
Inactive
This branch was previously deployed
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.
RunnerImpl.restore_from_checkpointis annotated-> Noneand returns nothing, but its docstring documents a return value:Returns: None on success.carries nothing the-> Noneannotation and theRaises:section do not already say, and it is the same shape as #10168, which dropped aReturns:block from a method that returnsNone.Change
Removes the three-line
Returns:block;Args:andRaises:stay. One file,−3lines, no code touched.How it was found
A sweep over
python/packages/core/agent_frameworkthat parses each function withast, checks whether the docstring has aReturns:/Return:section, and then looks for areturn <value>in that function's own body — nested functions and classes are skipped so their returns do not count. Functions that are abstract stubs (onlypass,..., orraise NotImplementedError) are excluded, which is what removes the large majority of hits: 1993 documented functions scanned, 53 with aReturns:and no value return, and after excluding stubs and nested scopes, this is the only one left.Worth noting how the filter behaved on the others, since it is the difference between a report and noise:
_clients.py,_skills.py,_harness/_file_access.pyand similar hits are allraise NotImplementedErrorprotocol members whose annotated return value is documented for implementers, which is correct as written.