Skip to content

feat(sdk): explicit typed signatures on client-level forwarders - #9

Merged
yudelevi merged 1 commit into
developmentfrom
feat/typed-client-forwarders
Aug 21, 2026
Merged

feat(sdk): explicit typed signatures on client-level forwarders#9
yudelevi merged 1 commit into
developmentfrom
feat/typed-client-forwarders

Conversation

@yudelevi

@yudelevi yudelevi commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Why

client.discover/count/validate_icp/append/segment were **kwargs: Any forwarders 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 — discover 41 params, count 25, validate_icp 6, append/segment 5 each — forwarding by keyword. Wire behavior unchanged: inner methods already drop_none before 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.

  • Adds complete typed signatures for discovery, counting, ICP validation, append, and segmentation entry points.
  • Forwards every declared argument by matching keyword to the corresponding resource method.
  • Documents the SDK typing improvement in the changelog.

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

Filename Overview
packages/discolike/src/discolike/_client.py The new sync and async signatures, defaults, parameter types, forwarding keywords, and return annotations match their underlying resource methods without changing valid-call behavior.
CHANGELOG.md Accurately documents the newly explicit client-level signatures and preserved request behavior.

Reviews (1): Last reviewed commit: "feat(sdk): explicit typed signatures on ..." | Re-trigger Greptile

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.
@yudelevi
yudelevi merged commit 2dbb977 into development Aug 21, 2026
1 check passed
@yudelevi
yudelevi deleted the feat/typed-client-forwarders branch August 21, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant