Repository navigation
Conversation
`read_resource`, `send_request`, `call_tool` and `get_prompt` each document only the input-required kwargs. The block was written once and copied, so every one of them hides the parameters a caller has to pass: - `send_request` documented `metadata` and omitted `request`, `result_type`, `request_read_timeout_seconds`, `progress_callback`. - `read_resource` omitted `uri` — the only parameter without a default — and `meta`. - `call_tool` omitted `name`, `arguments`, `read_timeout_seconds`, `progress_callback`, `meta`. - `get_prompt` omitted `name`, `arguments`, `meta`. Docstrings only: an AST comparison against the previous head is identical once docstrings are excluded, and every parameter of the four methods now appears in its Args block. `pytest tests/client/test_session.py` -> 94 passed; `ruff check` and `ruff format --check` pass.
|
This PR has been closed automatically. This repo only keeps pull requests open when they come from a maintainer, or from a contributor a maintainer has assigned to the linked issue, and you aren't currently assigned to #3846. If a maintainer assigns you to #3846, this PR reopens on its own and there's nothing more you need to do here. Assignment is a maintainer call based on capacity; comments that only ask to be assigned don't factor in. What does help is engaging on the issue itself by confirming the repro, explaining why it matters for your use case, or describing the approach you'd take. You're welcome to keep pushing commits here (just avoid force-pushing, since GitHub can't reopen a rewritten branch), but that on its own won't get the PR reviewed or the issue assigned, and realistically most auto-closed PRs stay closed. There's no need to open a new PR either way. CONTRIBUTING.md has the full reasoning, but in short:
Maintainers: reopen, remove |
Fixes #3846
Four
ClientSessionmethods document only their input-required kwargs, so the rendered reference hides the arguments a caller has to pass. The block was written once for the newer kwargs and copied to the neighbours.send_requestmetadatarequest,result_type,request_read_timeout_seconds,progress_callbackread_resourceuri(the only parameter without a default),metacall_toolname,arguments,read_timeout_seconds,progress_callback,metaget_promptname,arguments,metaOn the overload question raised in the issue:
mkdocs.ymlsets noshow_overloadsoption, so mkdocstrings renders the overload signatures and takes the docstring from the implementation — the blocks belong on the implementation, which is where they are. I did not add Args blocks to the@overloadstubs; that would duplicate four copies of the same text.Verification
Args:block (checked by parsing the module withast).pytest tests/client/test_session.py→ 94 passed.ruff checkandruff format --checkon the file: pass.Credit to media-ctrl for reproducing this on
mainand for widening the scope from four methods to the surrounding copies.I did not add the "walk the public client methods and assert every parameter appears in Args" test suggested in the issue — that is a behaviour change for the test suite and worth its own PR if you want it. Say so and I will open it.