From 55f90a442b1a1ae6a1cabef877790eefd7d95ca7 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Fri, 7 Nov 2025 10:39:03 +0100 Subject: [PATCH] chore: fix typos --- CONTRIBUTING.md | 2 +- src/apify_client/_logging.py | 10 +++++----- src/apify_client/clients/resource_clients/build.py | 4 ++-- src/apify_client/clients/resource_clients/log.py | 12 ++++++------ src/apify_client/clients/resource_clients/run.py | 4 ++-- tests/integration/test_run_collection.py | 6 +++--- tests/unit/test_logging.py | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba806208..e0328ea1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -130,7 +130,7 @@ make run-doc Publishing new versions to [PyPI](https://pypi.org/project/apify_client) is automated through GitHub Actions. - **Beta releases**: On each commit to the master branch, a new beta release is automatically published. The version number is determined based on the latest release and conventional commits. The beta version suffix is incremented by 1 from the last beta release on PyPI. -- **Stable releases**: A stable version release may be created by triggering the `release` GitHub Actions workflow. The version number is determined based on the latest release and conventional commits (`auto` release type), or it may be overriden using the `custom` release type. +- **Stable releases**: A stable version release may be created by triggering the `release` GitHub Actions workflow. The version number is determined based on the latest release and conventional commits (`auto` release type), or it may be overridden using the `custom` release type. ### Publishing to PyPI manually diff --git a/src/apify_client/_logging.py b/src/apify_client/_logging.py index b42dc2b5..cfdfe42c 100644 --- a/src/apify_client/_logging.py +++ b/src/apify_client/_logging.py @@ -155,16 +155,16 @@ def create_redirect_logger( class RedirectLogFormatter(logging.Formatter): - """Formater applied to default redirect logger.""" + """Formatter applied to default redirect logger.""" def format(self, record: logging.LogRecord) -> str: """Format the log by prepending logger name to the original message. Args: - record: Log record to be formated. + record: Log record to be formatted. Returns: - Formated log message. + Formatted log message. """ - formated_logger_name = f'{Fore.CYAN}[{record.name}]{Style.RESET_ALL}' - return f'{formated_logger_name} -> {record.msg}' + formatted_logger_name = f'{Fore.CYAN}[{record.name}]{Style.RESET_ALL}' + return f'{formatted_logger_name} -> {record.msg}' diff --git a/src/apify_client/clients/resource_clients/build.py b/src/apify_client/clients/resource_clients/build.py index 95901c93..e4f7d6cf 100644 --- a/src/apify_client/clients/resource_clients/build.py +++ b/src/apify_client/clients/resource_clients/build.py @@ -64,7 +64,7 @@ def wait_for_finish(self, *, wait_secs: int | None = None) -> dict | None: wait_secs: How long does the client wait for build to finish. None for indefinite. Returns: - The Actor build data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED, + The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED, TIMED_OUT, ABORTED), then the build has not yet finished. """ return self._wait_for_finish(wait_secs=wait_secs) @@ -140,7 +140,7 @@ async def wait_for_finish(self, *, wait_secs: int | None = None) -> dict | None: wait_secs: How long does the client wait for build to finish. None for indefinite. Returns: - The Actor build data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED, + The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED, TIMED_OUT, ABORTED), then the build has not yet finished. """ return await self._wait_for_finish(wait_secs=wait_secs) diff --git a/src/apify_client/clients/resource_clients/log.py b/src/apify_client/clients/resource_clients/log.py index 759ae1fd..d333fb6e 100644 --- a/src/apify_client/clients/resource_clients/log.py +++ b/src/apify_client/clients/resource_clients/log.py @@ -38,7 +38,7 @@ def get(self, *, raw: bool = False) -> str | None: https://docs.apify.com/api/v2#/reference/logs/log/get-log Args: - raw: If true, the log will include formating. For example, coloring character sequences. + raw: If true, the log will include formatting. For example, coloring character sequences. Returns: The retrieved log, or None, if it does not exist. @@ -63,7 +63,7 @@ def get_as_bytes(self, *, raw: bool = False) -> bytes | None: https://docs.apify.com/api/v2#/reference/logs/log/get-log Args: - raw: If true, the log will include formating. For example, coloring character sequences. + raw: If true, the log will include formatting. For example, coloring character sequences. Returns: The retrieved log as raw bytes, or None, if it does not exist. @@ -89,7 +89,7 @@ def stream(self, *, raw: bool = False) -> Iterator[impit.Response | None]: https://docs.apify.com/api/v2#/reference/logs/log/get-log Args: - raw: If true, the log will include formating. For example, coloring character sequences. + raw: If true, the log will include formatting. For example, coloring character sequences. Returns: The retrieved log as a context-managed streaming `Response`, or None, if it does not exist. @@ -125,7 +125,7 @@ async def get(self, *, raw: bool = False) -> str | None: https://docs.apify.com/api/v2#/reference/logs/log/get-log Args: - raw: If true, the log will include formating. For example, coloring character sequences. + raw: If true, the log will include formatting. For example, coloring character sequences. Returns: The retrieved log, or None, if it does not exist. @@ -150,7 +150,7 @@ async def get_as_bytes(self, *, raw: bool = False) -> bytes | None: https://docs.apify.com/api/v2#/reference/logs/log/get-log Args: - raw: If true, the log will include formating. For example, coloring character sequences. + raw: If true, the log will include formatting. For example, coloring character sequences. Returns: The retrieved log as raw bytes, or None, if it does not exist. @@ -176,7 +176,7 @@ async def stream(self, *, raw: bool = False) -> AsyncIterator[impit.Response | N https://docs.apify.com/api/v2#/reference/logs/log/get-log Args: - raw: If true, the log will include formating. For example, coloring character sequences. + raw: If true, the log will include formatting. For example, coloring character sequences. Returns: The retrieved log as a context-managed streaming `Response`, or None, if it does not exist. diff --git a/src/apify_client/clients/resource_clients/run.py b/src/apify_client/clients/resource_clients/run.py index d934c01b..7889709e 100644 --- a/src/apify_client/clients/resource_clients/run.py +++ b/src/apify_client/clients/resource_clients/run.py @@ -109,7 +109,7 @@ def wait_for_finish(self, *, wait_secs: int | None = None) -> dict | None: wait_secs: How long does the client wait for run to finish. None for indefinite. Returns: - The Actor run data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED, + The Actor run data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED, TIMED_OUT, ABORTED), then the run has not yet finished. """ return self._wait_for_finish(wait_secs=wait_secs) @@ -424,7 +424,7 @@ async def wait_for_finish(self, *, wait_secs: int | None = None) -> dict | None: wait_secs: How long does the client wait for run to finish. None for indefinite. Returns: - The Actor run data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED, + The Actor run data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED, TIMED_OUT, ABORTED), then the run has not yet finished. """ return await self._wait_for_finish(wait_secs=wait_secs) diff --git a/tests/integration/test_run_collection.py b/tests/integration/test_run_collection.py index f01ca2d8..bfff83cf 100644 --- a/tests/integration/test_run_collection.py +++ b/tests/integration/test_run_collection.py @@ -20,9 +20,9 @@ class TestRunCollectionSync: def setup_runs(self, apify_client: ApifyClient) -> None: self.created_runs = [] - successfull_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call() - if successfull_run is not None: - self.created_runs.append(successfull_run) + successful_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call() + if successful_run is not None: + self.created_runs.append(successful_run) timed_out_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call(timeout_secs=1) if timed_out_run is not None: diff --git a/tests/unit/test_logging.py b/tests/unit/test_logging.py index c518935b..61f7113f 100644 --- a/tests/unit/test_logging.py +++ b/tests/unit/test_logging.py @@ -267,7 +267,7 @@ async def test_actor_call_redirect_logs_to_default_logger_async( with caplog.at_level(logging.DEBUG, logger=logger_name): await actor_client.call() - # Ensure expected handler and formater + # Ensure expected handler and formatter assert isinstance(logger.handlers[0].formatter, RedirectLogFormatter) assert isinstance(logger.handlers[0], logging.StreamHandler) @@ -294,7 +294,7 @@ def test_actor_call_redirect_logs_to_default_logger_sync( with caplog.at_level(logging.DEBUG, logger=logger_name): actor_client.call() - # Ensure expected handler and formater + # Ensure expected handler and formatter assert isinstance(logger.handlers[0].formatter, RedirectLogFormatter) assert isinstance(logger.handlers[0], logging.StreamHandler)