Repository navigation
Python: Remove a stale Args block from a samples docstring - #10233
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
`run_chat_client()` in `samples/02-agents/observability/advanced_manual_setup_console_output.py`
takes no parameters, but its docstring documents one:
async def run_chat_client() -> None:
"""Run an AI service.
...
Args:
stream: Whether to use streaming for the plugin
"""
Nothing in the function reads `stream`, and the phrase "for the plugin" says where the
paragraph came from — a sibling sample. A reader who wants to turn streaming on will look
for the parameter, not find it, and have to decide whether the sample is out of date or they
are reading the wrong overload.
Removing the block leaves the rest of the docstring untouched; `Args:` is the only section
that described something absent.
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 14:18 — with
GitHub Actions
Active
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 14:18 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for this docstring-only correction.
No open issues 🎉
What changed in this PR
Corrects the observability sample’s run_chat_client() docstring to match its parameterless signature.
Changes:
- Removes the stale
Args:block documenting an unusedstreamparameter. - Leaves runtime behavior and the remaining docstring unchanged.
| File | Description |
|---|---|
python/samples/02-agents/observability/advanced_manual_setup_console_output.py |
Removes incorrect parameter documentation from run_chat_client(). |
Review effort: Balanced
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 14:58 — with
GitHub Actions
Active
Hyacinth-of-Security (lxcxjxhx)
deployed
to
github-app-auth
November 10, 2026 17:16 — with
GitHub Actions
Active
This branch was successfully 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
run_chat_client()inpython/samples/02-agents/observability/advanced_manual_setup_console_output.pytakes no parameters:but its docstring documents one:
Nothing in the function reads
stream, and "for the plugin" points at where the paragraph came from — a sibling plugin sample. Someone reading this file to learn how streaming is enabled will look for the parameter, not find it, and have to decide whether the sample is stale or they opened the wrong overload.Description & Review Guide
Args:heading, thestream:entry, and the blank line that separated it fromRemarks:.Remarks:block — is untouched.streamusage and no streaming branch, so documenting it seemed like the smaller fix than inventing behaviour; if the intent was that this sample should demonstrate streaming, the parameter is the thing to add and I can do that instead.Related Issue
N/A - trivial change
AI Assistance
Assisted areas: documentation. A scan of this repository's docstrings compared each
Args:entry against the actual signature and reported this function as the single mismatch inpython/(1342 files). I read the function to confirm it takes no arguments and does not referencestream, and re-ran the same scan after the edit to confirm the mismatch count went from 1 to 0. The PR description and the commit message are mine.