feat(sdk): explicit typed signatures on client-level forwarders - #9
Merged
Conversation
discover, count, validate_icp, append, and segment forwarded **kwargs to typed methods on private resources — the typed signatures existed but were unreachable, so the five most-used entry points had no static checking or completion, and a misspelled keyword surfaced only at runtime (or reached the API as an unknown query parameter). The forwarders now mirror the inner signatures exactly and forward each parameter by keyword; wire behavior is unchanged since inner methods drop None values before sending.
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
client.discover/count/validate_icp/append/segmentwere**kwargs: Anyforwarders to typed methods on private resources — no static checking or completion on the five most-used entry points; typos surfaced at runtime or reached the API as unknown params (todo item 3, option (a) per discussion).What
Each forwarder (sync + async) mirrors its inner signature exactly —
discover41 params,count25,validate_icp6,append/segment5 each — forwarding by keyword. Wire behavior unchanged: inner methods alreadydrop_nonebefore sending.Tests
Full suite: 160 passed; ruff + ty clean.
Greptile Summary
The PR replaces untyped client-level keyword forwarders with explicit typed signatures while preserving the underlying sync and async resource contracts.
Confidence Score: 5/5
The PR appears safe to merge with no actionable correctness, compatibility, or security issues identified.
The explicit sync and async signatures mirror their resource counterparts, every parameter is forwarded under the correct keyword, and optional None values retain the existing transport behavior.
Important Files Changed
Reviews (1): Last reviewed commit: "feat(sdk): explicit typed signatures on ..." | Re-trigger Greptile