Skip to content

Commit a0a80dc

Browse files
committed
1 parent c2d200c commit a0a80dc

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

docs/02_concepts/code/03_nested_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async def main() -> None:
1313
actor_runs = (await runs_client.list(limit=10, desc=True)).items
1414

1515
# Select the last run of the Actor that finished with a SUCCEEDED status
16-
last_succeeded_run_client = actor_client.last_run(status='SUCCEEDED') # type: ignore[invalid-argument-type]
16+
last_succeeded_run_client = actor_client.last_run(status='SUCCEEDED') # ty: ignore[invalid-argument-type]
1717

1818
# Get dataset
1919
actor_run_dataset_client = last_succeeded_run_client.dataset()

docs/02_concepts/code/03_nested_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def main() -> None:
1313
actor_runs = runs_client.list(limit=10, desc=True).items
1414

1515
# Select the last run of the Actor that finished with a SUCCEEDED status
16-
last_succeeded_run_client = actor_client.last_run(status='SUCCEEDED') # type: ignore[invalid-argument-type]
16+
last_succeeded_run_client = actor_client.last_run(status='SUCCEEDED') # ty: ignore[invalid-argument-type]
1717

1818
# Get dataset
1919
actor_run_dataset_client = last_succeeded_run_client.dataset()

src/apify_client/_logging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _injects_client_details_to_log_context(fun: Callable) -> Callable:
5959

6060
@functools.wraps(fun)
6161
async def async_wrapper(resource_client: _BaseBaseClient, *args: Any, **kwargs: Any) -> Any:
62-
log_context.client_method.set(fun.__qualname__) # type: ignore[unresolved-attribute]
62+
log_context.client_method.set(fun.__qualname__) # ty: ignore[unresolved-attribute]
6363
log_context.resource_id.set(resource_client.resource_id)
6464

6565
return await fun(resource_client, *args, **kwargs)
@@ -69,7 +69,7 @@ async def async_wrapper(resource_client: _BaseBaseClient, *args: Any, **kwargs:
6969

7070
@functools.wraps(fun)
7171
async def async_generator_wrapper(resource_client: _BaseBaseClient, *args: Any, **kwargs: Any) -> Any:
72-
log_context.client_method.set(fun.__qualname__) # type: ignore[unresolved-attribute]
72+
log_context.client_method.set(fun.__qualname__) # ty: ignore[unresolved-attribute]
7373
log_context.resource_id.set(resource_client.resource_id)
7474

7575
async for item in fun(resource_client, *args, **kwargs):
@@ -80,7 +80,7 @@ async def async_generator_wrapper(resource_client: _BaseBaseClient, *args: Any,
8080

8181
@functools.wraps(fun)
8282
def wrapper(resource_client: _BaseBaseClient, *args: Any, **kwargs: Any) -> Any:
83-
log_context.client_method.set(fun.__qualname__) # type: ignore[unresolved-attribute]
83+
log_context.client_method.set(fun.__qualname__) # ty: ignore[unresolved-attribute]
8484
log_context.resource_id.set(resource_client.resource_id)
8585

8686
return fun(resource_client, *args, **kwargs)

src/apify_client/clients/resource_clients/actor_collection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ def create(
5050
description: str | None = None,
5151
seo_title: str | None = None,
5252
seo_description: str | None = None,
53-
versions: list[dict] | None = None, # type: ignore[invalid-type-form]
53+
versions: list[dict] | None = None, # ty: ignore[invalid-type-form]
5454
restart_on_error: bool | None = None,
5555
is_public: bool | None = None,
5656
is_deprecated: bool | None = None,
5757
is_anonymously_runnable: bool | None = None,
58-
categories: list[str] | None = None, # type: ignore[invalid-type-form]
58+
categories: list[str] | None = None, # ty: ignore[invalid-type-form]
5959
default_run_build: str | None = None,
6060
default_run_max_items: int | None = None,
6161
default_run_memory_mbytes: int | None = None,
@@ -175,12 +175,12 @@ async def create(
175175
description: str | None = None,
176176
seo_title: str | None = None,
177177
seo_description: str | None = None,
178-
versions: list[dict] | None = None, # type: ignore[invalid-type-form]
178+
versions: list[dict] | None = None, # ty: ignore[invalid-type-form]
179179
restart_on_error: bool | None = None,
180180
is_public: bool | None = None,
181181
is_deprecated: bool | None = None,
182182
is_anonymously_runnable: bool | None = None,
183-
categories: list[str] | None = None, # type: ignore[invalid-type-form]
183+
categories: list[str] | None = None, # ty: ignore[invalid-type-form]
184184
default_run_build: str | None = None,
185185
default_run_max_items: int | None = None,
186186
default_run_memory_mbytes: int | None = None,

src/apify_client/clients/resource_clients/actor_version_collection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def create(
3434
*,
3535
version_number: str,
3636
build_tag: str | None = None,
37-
env_vars: list[dict] | None = None, # type: ignore[invalid-type-form]
37+
env_vars: list[dict] | None = None, # ty: ignore[invalid-type-form]
3838
apply_env_vars_to_build: bool | None = None,
3939
source_type: ActorSourceType,
40-
source_files: list[dict] | None = None, # type: ignore[invalid-type-form]
40+
source_files: list[dict] | None = None, # ty: ignore[invalid-type-form]
4141
git_repo_url: str | None = None,
4242
tarball_url: str | None = None,
4343
github_gist_url: str | None = None,
@@ -103,10 +103,10 @@ async def create(
103103
*,
104104
version_number: str,
105105
build_tag: str | None = None,
106-
env_vars: list[dict] | None = None, # type: ignore[invalid-type-form]
106+
env_vars: list[dict] | None = None, # ty: ignore[invalid-type-form]
107107
apply_env_vars_to_build: bool | None = None,
108108
source_type: ActorSourceType,
109-
source_files: list[dict] | None = None, # type: ignore[invalid-type-form]
109+
source_files: list[dict] | None = None, # ty: ignore[invalid-type-form]
110110
git_repo_url: str | None = None,
111111
tarball_url: str | None = None,
112112
github_gist_url: str | None = None,

src/apify_client/clients/resource_clients/run_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def list(
2626
limit: int | None = None,
2727
offset: int | None = None,
2828
desc: bool | None = None,
29-
status: ActorJobStatus | list[ActorJobStatus] | None = None, # type: ignore[invalid-type-form]
29+
status: ActorJobStatus | list[ActorJobStatus] | None = None, # ty: ignore[invalid-type-form]
3030
started_before: str | datetime | None = None,
3131
started_after: str | datetime | None = None,
3232
) -> ListPage[dict]:
@@ -77,7 +77,7 @@ async def list(
7777
limit: int | None = None,
7878
offset: int | None = None,
7979
desc: bool | None = None,
80-
status: ActorJobStatus | list[ActorJobStatus] | None = None, # type: ignore[invalid-type-form]
80+
status: ActorJobStatus | list[ActorJobStatus] | None = None, # ty: ignore[invalid-type-form]
8181
started_before: str | datetime | None = None,
8282
started_after: str | datetime | None = None,
8383
) -> ListPage[dict]:

src/apify_client/clients/resource_clients/schedule_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def create(
4545
is_enabled: bool,
4646
is_exclusive: bool,
4747
name: str | None = None,
48-
actions: list[dict] | None = None, # type: ignore[valid-type]
48+
actions: list[dict] | None = None, # ty: ignore[invalid-type-form]
4949
description: str | None = None,
5050
timezone: str | None = None,
5151
title: str | None = None,
@@ -121,7 +121,7 @@ async def create(
121121
is_enabled: bool,
122122
is_exclusive: bool,
123123
name: str | None = None,
124-
actions: list[dict] | None = None, # type: ignore[valid-type]
124+
actions: list[dict] | None = None, # ty: ignore[invalid-type-form]
125125
description: str | None = None,
126126
timezone: str | None = None,
127127
title: str | None = None,

src/apify_client/clients/resource_clients/webhook_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def list(
4343
def create(
4444
self,
4545
*,
46-
event_types: list[WebhookEventType], # type: ignore[valid-type]
46+
event_types: list[WebhookEventType], # ty: ignore[invalid-type-form]
4747
request_url: str,
4848
payload_template: str | None = None,
4949
headers_template: str | None = None,
@@ -127,7 +127,7 @@ async def list(
127127
async def create(
128128
self,
129129
*,
130-
event_types: list[WebhookEventType], # type: ignore[valid-type]
130+
event_types: list[WebhookEventType], # ty: ignore[invalid-type-form]
131131
request_url: str,
132132
payload_template: str | None = None,
133133
headers_template: str | None = None,

tests/unit/test_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ def test_add_rate_limit_error_type_validation() -> None:
4141
"""Test type validation in add_rate_limit_error."""
4242
stats = Statistics()
4343
with pytest.raises(TypeError):
44-
stats.add_rate_limit_error('1') # type: ignore[arg-type]
44+
stats.add_rate_limit_error('1') # ty: ignore[invalid-argument-type]

0 commit comments

Comments
 (0)