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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dev = [
"pytest~=8.3.0",
"redbaron~=0.9.0",
"respx~=0.22.0",
"ruff~=0.9.0",
"ruff~=0.10.0",
"setuptools~=76.0.0", # setuptools are used by pytest but not explicitly required
]

Expand Down
4 changes: 2 additions & 2 deletions src/apify_client/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def to_safe_id(id: str) -> str:

def pluck_data(parsed_response: Any) -> dict:
if isinstance(parsed_response, dict) and 'data' in parsed_response:
return cast(dict, parsed_response['data'])
return cast('dict', parsed_response['data'])

raise ValueError('The "data" property is missing in the response.')


def pluck_data_as_list(parsed_response: Any) -> list:
if isinstance(parsed_response, dict) and 'data' in parsed_response:
return cast(list, parsed_response['data'])
return cast('list', parsed_response['data'])

raise ValueError('The "data" property is missing in the response.')

Expand Down
8 changes: 4 additions & 4 deletions src/apify_client/clients/resource_clients/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def get_input(self) -> dict | None:
method='GET',
params=self._params(),
)
return cast(dict, response.json())
return cast('dict', response.json())
except ApifyApiError as exc:
catch_not_found_or_throw(exc)
return None
Expand All @@ -283,7 +283,7 @@ def update_input(self, *, task_input: dict) -> dict:
params=self._params(),
json=task_input,
)
return cast(dict, response.json())
return cast('dict', response.json())

def runs(self) -> RunCollectionClient:
"""Retrieve a client for the runs of this task."""
Expand Down Expand Up @@ -521,7 +521,7 @@ async def get_input(self) -> dict | None:
method='GET',
params=self._params(),
)
return cast(dict, response.json())
return cast('dict', response.json())
except ApifyApiError as exc:
catch_not_found_or_throw(exc)
return None
Expand All @@ -540,7 +540,7 @@ async def update_input(self, *, task_input: dict) -> dict:
params=self._params(),
json=task_input,
)
return cast(dict, response.json())
return cast('dict', response.json())

def runs(self) -> RunCollectionClientAsync:
"""Retrieve a client for the runs of this task."""
Expand Down
46 changes: 23 additions & 23 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.