Three parallel review agents (code reuse, quality, efficiency) reviewed
the full PR #8 diff. Reuse and efficiency: clean. Quality found
actionable comment density and one dead-state issue.
Fixed:
- Remove dead `_user_agent` attribute from both clients — stored in
__init__ but never read after being baked into `_base_headers`.
Inlined the `user_agent or default_user_agent()` expression directly
into the headers dict.
- Trim `_raw_request` docstring from 31 lines to 7 in both clients —
the hypothetical scenarios and precedence-order details are
over-documentation for a private method with one non-default caller.
- Trim `_validate_batch_create_shape._fail` comments from 14 lines to
2 — was more comment than code.
- Trim `parse_quota` plan-default comment from 6 lines to 1.
- Trim `build_list_params` type-annotation comment (3 lines → 0).
- Trim spec-validation section banner (3 lines → 1).
- Remove `cast` explanation comments from both clients (4 lines each).
Skipped (not worth the churn):
- Sync/async duplication — tracked as #20, structural limitation.
- Parameter sprawl on list()/list_all() — at threshold but not over.
- HTTP method Literal type annotation — low risk for a private method.
- Double getattr in _serialize_value — negligible cost on max 7 fields.
Net: -78 lines across 3 files. 158 tests passing (unchanged).
Summary
_user_agentattribute from both sync/async clients_utils.py,client.py,async_client.pyStacks on top of PR #8 (
feat/align-api-v2). Result of running/simplifywith three parallel review agents (code reuse, quality, efficiency).What was trimmed
_raw_requestdocstring (×2 clients)_validate_batch_create_shape._failcommentsparse_quotaplan-default commentbuild_list_paramstype commentcastexplanation (×2 clients)_user_agentattribute (×2 clients)What was skipped
list()/list_all()— at threshold (9 params) but not overLiteraltype annotation — low risk for a private method, would need both clients updatedgetattrin_serialize_value— negligible cost on max 7-field dataclasses🤖 Generated with Claude Code