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
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D107", # Missing docstring in `__init__`
"D203", # One blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D413", # Missing blank line after last section
"EM", # flake8-errmsg
"G004", # Logging statement uses f-string
"ISC001", # This rule may cause conflicts when used with the formatter
Expand Down Expand Up @@ -137,9 +140,6 @@ inline-quotes = "single"
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.isort]
known-local-folder = ["apify_client"]

Expand Down
4 changes: 2 additions & 2 deletions src/apify_client/_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ApifyApiError(ApifyClientError):

@ignore_docs
def __init__(self, response: httpx.Response, attempt: int) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
response: The response to the failed API call.
Expand Down Expand Up @@ -62,7 +62,7 @@ class InvalidResponseBodyError(ApifyClientError):

@ignore_docs
def __init__(self, response: httpx.Response) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
response: The response which failed to be parsed.
Expand Down
6 changes: 3 additions & 3 deletions src/apify_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
min_delay_between_retries_millis: int | None = 500,
timeout_secs: int | None = 360,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
token: The Apify API token.
Expand Down Expand Up @@ -109,7 +109,7 @@ def __init__(
min_delay_between_retries_millis: int | None = 500,
timeout_secs: int | None = 360,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
token: The Apify API token.
Expand Down Expand Up @@ -292,7 +292,7 @@ def __init__(
min_delay_between_retries_millis: int | None = 500,
timeout_secs: int | None = 360,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
token: The Apify API token.
Expand Down
4 changes: 2 additions & 2 deletions src/apify_client/clients/base/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
resource_path: str,
params: dict | None = None,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
base_url: Base URL of the API server.
Expand Down Expand Up @@ -106,7 +106,7 @@ def __init__(
resource_path: str,
params: dict | None = None,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
base_url: Base URL of the API server.
Expand Down
2 changes: 1 addition & 1 deletion src/apify_client/clients/resource_clients/actor_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_actor_env_var_representation(
name: str | None = None,
value: str | None = None,
) -> dict:
"""Returns an environment variable representation of the Actor in a dictionary."""
"""Return an environment variable representation of the Actor in a dictionary."""
return {
'isSecret': is_secret,
'name': name,
Expand Down
6 changes: 3 additions & 3 deletions src/apify_client/clients/resource_clients/request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__( # noqa: D417
client_key: str | None = None,
**kwargs: Any,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
client_key: A unique identifier of the client accessing the request queue.
Expand Down Expand Up @@ -415,7 +415,7 @@ def __init__( # noqa: D417
client_key: str | None = None,
**kwargs: Any,
) -> None:
"""A default constructor.
"""Initialize a new instance.

Args:
client_key: A unique identifier of the client accessing the request queue.
Expand Down Expand Up @@ -648,7 +648,7 @@ async def _batch_add_requests_worker(

This worker will process batches from the queue, retrying requests that fail until the retry limit is reached.

Returns result containing lists of processed and unprocessed requests by the worker.
Return result containing lists of processed and unprocessed requests by the worker.
"""
processed_requests = list[dict]()
unprocessed_requests = list[dict]()
Expand Down
8 changes: 4 additions & 4 deletions src/apify_client/clients/resource_clients/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def monthly_usage(self) -> dict | None:
return None

def limits(self) -> dict | None:
"""Returns a complete summary of the user account's limits.
"""Return a complete summary of the user account's limits.

It is the same information which is available on the account's Limits page. The returned data includes
the current usage cycle, a summary of the account's limits, and the current usage.
Expand Down Expand Up @@ -87,7 +87,7 @@ def update_limits(
max_monthly_usage_usd: int | None = None,
data_retention_days: int | None = None,
) -> None:
"""Updates the account's limits manageable on your account's Limits page."""
"""Update the account's limits manageable on your account's Limits page."""
self.http_client.call(
url=self._url('limits'),
method='PUT',
Expand Down Expand Up @@ -150,7 +150,7 @@ async def monthly_usage(self) -> dict | None:
return None

async def limits(self) -> dict | None:
"""Returns a complete summary of the user account's limits.
"""Return a complete summary of the user account's limits.

It is the same information which is available on the account's Limits page. The returned data includes
the current usage cycle, a summary of the account's limits, and the current usage.
Expand Down Expand Up @@ -179,7 +179,7 @@ async def update_limits(
max_monthly_usage_usd: int | None = None,
data_retention_days: int | None = None,
) -> None:
"""Updates the account's limits manageable on your account's Limits page."""
"""Update the account's limits manageable on your account's Limits page."""
await self.http_client.call(
url=self._url('limits'),
method='PUT',
Expand Down