Skip to content

Commit c924aad

Browse files
authored
refactor: declare per-request options once as TypedDicts in client.py (#186)
Every verb, *_with_response sibling and stream() in both clients now takes **kwargs: Unpack[_RequestOptions] or Unpack[_BodyRequestOptions]. The pass-through layers _request_with_body, _request_with_body_with_response and _assemble_request_kwargs are gone; _request_kwargs drops options left at their default and raises TypeError on an unknown keyword.
1 parent b9e2861 commit c924aad

7 files changed

Lines changed: 375 additions & 1200 deletions

File tree

‎pyproject.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ isort.no-lines-before = ["standard-library", "local-folder"]
117117
include = ["scripts/**"]
118118
rules = { unresolved-import = "ignore" }
119119

120+
[[tool.ty.overrides]]
121+
include = ["tests/test_client_typing.py"]
122+
rules = { unused-ignore-comment = "error" }
123+
120124
[tool.pytest.ini_options]
121125
testpaths = ["tests"]
122126
addopts = ""

0 commit comments

Comments
 (0)