Repository navigation
Conversation
Add `QueryParamValue` and `QueryParams` to `apify_client.types` and use them for every query-parameter input in the client: `HttpClient.call`, `HttpClientAsync.call`, `_prepare_request_call`, `_parse_params`, the resource client's default params, `_build_params`, `_build_public_url`, and the wait-for-finish and batch-add helpers. The value union lists exactly what the client converts or sends unchanged: `str`, `int`, `float`, `bool`, `Decimal`, `datetime`, `list[str]`, and `None`. A list of non-strings raised a `TypeError` in the comma join, and any other value, such as a `timedelta`, a tuple or an enum, was sent as its `str()`; both are now type errors. `Decimal` is included because `max_total_charge_usd` is passed as one. The alias is a `Mapping` so a `dict[str, str]` or `dict[str, int]` is accepted without a cast. Custom HTTP clients that override `call` with `params: dict[str, Any] | None` now fail the override check in a type checker and should accept `QueryParams | None`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PMV1XJr6EmKKzmbe8tYp7C
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1164 +/- ##
==========================================
- Coverage 95.53% 95.45% -0.08%
==========================================
Files 61 61
Lines 5982 5987 +5
==========================================
Hits 5715 5715
- Misses 267 272 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
QueryParamValueandQueryParamstoapify_client.typesand uses them for everyparamsinput in the client (HttpClient.call,_build_params, default params, wait and batch helpers), generalizing the inline type from feat: add Server Actor support to Actor clients #1153.str,int,float,bool,Decimal,datetime,list[str],None); a list of non-strings raisedTypeError, and atimedelta, tuple, enum or dict was sent as its repr, so both are now type errors.callwithparams: dict[str, Any] | Noneshould acceptQueryParams | None; runtime behavior is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01PMV1XJr6EmKKzmbe8tYp7C