Repository navigation
Python: drop a Returns section from a method that returns None - #10168
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoNov 9, 2026
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Conversation
Hyacinth-of-Security (lxcxjxhx)
temporarily deployed
to
github-app-auth
November 7, 2026 13:04 — with
GitHub Actions
Inactive
Hyacinth-of-Security (lxcxjxhx)
temporarily deployed
to
github-app-auth
November 7, 2026 13:04 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the documentation-only update aligning the execute docstring with its None return annotation.
No open issues 🎉
What changed in this PR
This documentation-only change corrects the workflow executor’s execute docstring to match its None return annotation.
Changes:
- Removes the outdated
Returns:section that advertised an execution result. - Leaves the signature, runtime behavior, and tests unchanged.
| File | Description |
|---|---|
python/packages/core/agent_framework/_workflows/_executor.py |
Removes the misleading return-value documentation from execute. |
Review effort: Balanced
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Nov 9, 2026
BranBenji
pushed a commit
to BranBenji/agent-framework
that referenced
this pull request
Nov 11, 2026
…soft#10203) `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. Co-authored-by: lxcxjxhx <[email protected]>
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.
Motivation & Context
Executor.executeis annotated-> Noneand returns nothing, but its docstring still advertises a return value:The wording survived from an earlier shape of this method: the coroutine now resolves to
Noneafter the handlers have been dispatched. Becauseexecuteis the method every workflow internals path goes through, the stale sentence is the first thing a reader sees when they open the base class to find out how a message reaches a handler.Description & Review Guide
Returns:section ofWorkflowExecutor.execute(python/packages/core/agent_framework/_workflows/_executor.py). Nothing else changes: no signature, no default, no behaviour, no tests.python-api-compatibilityand the typing jobs are unaffected because no annotation moves.Args:block, a one-line "Returns nothing; send results throughrunner_context." is an equally small diff.Evidence that the documented value does not exist:
async def execute(self, message, source_executor_ids, state, runner_context, ...) -> None— the annotation isNone._edge_runner.py:147, doesawait target_executor.execute(...)and discards the result.= await …\.execute(finds middleware pipelines, the AG-UI intent owner, and database cursors — no caller of this method reads a value.Related Issue
N/A - trivial change. One docstring section removed on a method that returns
None; no design decision is involved and the diff is three deleted lines.AI Assistance
AI assistance details: the stale section was located with a static check that reports
Returns:blocks in functions whose body never returns a value, and documentation assistance (this description) was used. The finding itself was confirmed by hand against the signature and the single internal call site listed above.Contribution Checklist