Skip to content

Commit 66c5bf8

Browse files
authored
chore: update Ruff to v0.10 (#364)
There is a new rule [TC006](https://docs.astral.sh/ruff/rules/runtime-cast-value/).
1 parent 5e53969 commit 66c5bf8

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ dev = [
5353
"pytest~=8.3.0",
5454
"redbaron~=0.9.0",
5555
"respx~=0.22.0",
56-
"ruff~=0.9.0",
56+
"ruff~=0.10.0",
5757
"setuptools~=76.0.0", # setuptools are used by pytest but not explicitly required
5858
]
5959

src/apify_client/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ def to_safe_id(id: str) -> str:
3333

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

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

4040

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

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

src/apify_client/clients/resource_clients/task.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def get_input(self) -> dict | None:
264264
method='GET',
265265
params=self._params(),
266266
)
267-
return cast(dict, response.json())
267+
return cast('dict', response.json())
268268
except ApifyApiError as exc:
269269
catch_not_found_or_throw(exc)
270270
return None
@@ -283,7 +283,7 @@ def update_input(self, *, task_input: dict) -> dict:
283283
params=self._params(),
284284
json=task_input,
285285
)
286-
return cast(dict, response.json())
286+
return cast('dict', response.json())
287287

288288
def runs(self) -> RunCollectionClient:
289289
"""Retrieve a client for the runs of this task."""
@@ -521,7 +521,7 @@ async def get_input(self) -> dict | None:
521521
method='GET',
522522
params=self._params(),
523523
)
524-
return cast(dict, response.json())
524+
return cast('dict', response.json())
525525
except ApifyApiError as exc:
526526
catch_not_found_or_throw(exc)
527527
return None
@@ -540,7 +540,7 @@ async def update_input(self, *, task_input: dict) -> dict:
540540
params=self._params(),
541541
json=task_input,
542542
)
543-
return cast(dict, response.json())
543+
return cast('dict', response.json())
544544

545545
def runs(self) -> RunCollectionClientAsync:
546546
"""Retrieve a client for the runs of this task."""

uv.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)