Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/apify_client/_resource_clients/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def start(
run_timeout: timedelta | None = None,
force_permission_level: ActorPermissionLevel | None = None,
wait_for_finish: int | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
timeout: Timeout = 'medium',
) -> Run:
"""Start the Actor and immediately return the Run object.
Expand Down Expand Up @@ -303,7 +303,7 @@ def call(
restart_on_error: bool | None = None,
memory_mbytes: int | None = None,
run_timeout: timedelta | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
force_permission_level: ActorPermissionLevel | None = None,
wait_duration: timedelta | None = None,
logger: Logger | None | Literal['default'] = 'default',
Expand Down Expand Up @@ -725,7 +725,7 @@ async def start(
run_timeout: timedelta | None = None,
force_permission_level: ActorPermissionLevel | None = None,
wait_for_finish: int | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
timeout: Timeout = 'medium',
) -> Run:
"""Start the Actor and immediately return the Run object.
Expand Down Expand Up @@ -799,7 +799,7 @@ async def call(
restart_on_error: bool | None = None,
memory_mbytes: int | None = None,
run_timeout: timedelta | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
force_permission_level: ActorPermissionLevel | None = None,
wait_duration: timedelta | None = None,
logger: Logger | None | Literal['default'] = 'default',
Expand Down
8 changes: 4 additions & 4 deletions src/apify_client/_resource_clients/request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def delete_request_lock(

def batch_add_requests(
self,
requests: list[dict | RequestInput],
requests: list[RequestInput] | list[dict],
*,
forefront: bool = False,
max_parallel: int = 1,
Expand Down Expand Up @@ -454,7 +454,7 @@ def batch_add_requests(

def batch_delete_requests(
self,
requests: list[dict | RequestDeleteInput],
requests: list[RequestDeleteInput] | list[dict],
*,
timeout: Timeout = 'short',
) -> BatchDeleteResult:
Expand Down Expand Up @@ -895,7 +895,7 @@ async def _batch_add_requests_worker(

async def batch_add_requests(
self,
requests: list[dict | RequestInput],
requests: list[RequestInput] | list[dict],
*,
forefront: bool = False,
max_parallel: int = 5,
Expand Down Expand Up @@ -985,7 +985,7 @@ async def batch_add_requests(

async def batch_delete_requests(
self,
requests: list[dict | RequestDeleteInput],
requests: list[RequestDeleteInput] | list[dict],
*,
timeout: Timeout = 'short',
) -> BatchDeleteResult:
Expand Down
8 changes: 4 additions & 4 deletions src/apify_client/_resource_clients/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def start(
run_timeout: timedelta | None = None,
restart_on_error: bool | None = None,
wait_for_finish: int | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
timeout: Timeout = 'medium',
) -> Run:
"""Start the task and immediately return the Run object.
Expand Down Expand Up @@ -228,7 +228,7 @@ def call(
memory_mbytes: int | None = None,
run_timeout: timedelta | None = None,
restart_on_error: bool | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
wait_duration: timedelta | None = None,
timeout: Timeout = 'no_timeout',
) -> Run | None:
Expand Down Expand Up @@ -485,7 +485,7 @@ async def start(
run_timeout: timedelta | None = None,
restart_on_error: bool | None = None,
wait_for_finish: int | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
timeout: Timeout = 'medium',
) -> Run:
"""Start the task and immediately return the Run object.
Expand Down Expand Up @@ -552,7 +552,7 @@ async def call(
memory_mbytes: int | None = None,
run_timeout: timedelta | None = None,
restart_on_error: bool | None = None,
webhooks: list[dict | WebhookCreate] | None = None,
webhooks: list[WebhookCreate] | list[dict] | None = None,
wait_duration: timedelta | None = None,
timeout: Timeout = 'no_timeout',
) -> Run | None:
Expand Down
2 changes: 1 addition & 1 deletion src/apify_client/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class WebhookRepresentationList(RootModel[list[WebhookRepresentation]]):
"""List of webhook representations with base64 encoding support."""

@classmethod
def from_webhooks(cls, webhooks: list[dict | WebhookCreate]) -> WebhookRepresentationList:
def from_webhooks(cls, webhooks: list[WebhookCreate] | list[dict]) -> WebhookRepresentationList:
"""Construct from a list of `WebhookCreate` models or plain dicts.

Dicts are validated directly as `WebhookRepresentation`, so only the minimal ad-hoc webhook fields
Expand Down
Loading
Loading