Skip to content

Commit 7cc0460

Browse files
authored
chore: fix typos (#532)
based on the https://github.com/crate-ci/typos, we can integrate it into CI later (but expect false positives).
1 parent 8a8ae0b commit 7cc0460

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ make run-doc
130130
Publishing new versions to [PyPI](https://pypi.org/project/apify_client) is automated through GitHub Actions.
131131

132132
- **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.
133-
- **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.
133+
- **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.
134134

135135
### Publishing to PyPI manually
136136

src/apify_client/_logging.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,16 @@ def create_redirect_logger(
155155

156156

157157
class RedirectLogFormatter(logging.Formatter):
158-
"""Formater applied to default redirect logger."""
158+
"""Formatter applied to default redirect logger."""
159159

160160
def format(self, record: logging.LogRecord) -> str:
161161
"""Format the log by prepending logger name to the original message.
162162
163163
Args:
164-
record: Log record to be formated.
164+
record: Log record to be formatted.
165165
166166
Returns:
167-
Formated log message.
167+
Formatted log message.
168168
"""
169-
formated_logger_name = f'{Fore.CYAN}[{record.name}]{Style.RESET_ALL}'
170-
return f'{formated_logger_name} -> {record.msg}'
169+
formatted_logger_name = f'{Fore.CYAN}[{record.name}]{Style.RESET_ALL}'
170+
return f'{formatted_logger_name} -> {record.msg}'

src/apify_client/clients/resource_clients/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def wait_for_finish(self, *, wait_secs: int | None = None) -> dict | None:
6464
wait_secs: How long does the client wait for build to finish. None for indefinite.
6565
6666
Returns:
67-
The Actor build data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED,
67+
The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED,
6868
TIMED_OUT, ABORTED), then the build has not yet finished.
6969
"""
7070
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:
140140
wait_secs: How long does the client wait for build to finish. None for indefinite.
141141
142142
Returns:
143-
The Actor build data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED,
143+
The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED,
144144
TIMED_OUT, ABORTED), then the build has not yet finished.
145145
"""
146146
return await self._wait_for_finish(wait_secs=wait_secs)

src/apify_client/clients/resource_clients/log.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get(self, *, raw: bool = False) -> str | None:
3838
https://docs.apify.com/api/v2#/reference/logs/log/get-log
3939
4040
Args:
41-
raw: If true, the log will include formating. For example, coloring character sequences.
41+
raw: If true, the log will include formatting. For example, coloring character sequences.
4242
4343
Returns:
4444
The retrieved log, or None, if it does not exist.
@@ -63,7 +63,7 @@ def get_as_bytes(self, *, raw: bool = False) -> bytes | None:
6363
https://docs.apify.com/api/v2#/reference/logs/log/get-log
6464
6565
Args:
66-
raw: If true, the log will include formating. For example, coloring character sequences.
66+
raw: If true, the log will include formatting. For example, coloring character sequences.
6767
6868
Returns:
6969
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]:
8989
https://docs.apify.com/api/v2#/reference/logs/log/get-log
9090
9191
Args:
92-
raw: If true, the log will include formating. For example, coloring character sequences.
92+
raw: If true, the log will include formatting. For example, coloring character sequences.
9393
9494
Returns:
9595
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:
125125
https://docs.apify.com/api/v2#/reference/logs/log/get-log
126126
127127
Args:
128-
raw: If true, the log will include formating. For example, coloring character sequences.
128+
raw: If true, the log will include formatting. For example, coloring character sequences.
129129
130130
Returns:
131131
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:
150150
https://docs.apify.com/api/v2#/reference/logs/log/get-log
151151
152152
Args:
153-
raw: If true, the log will include formating. For example, coloring character sequences.
153+
raw: If true, the log will include formatting. For example, coloring character sequences.
154154
155155
Returns:
156156
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
176176
https://docs.apify.com/api/v2#/reference/logs/log/get-log
177177
178178
Args:
179-
raw: If true, the log will include formating. For example, coloring character sequences.
179+
raw: If true, the log will include formatting. For example, coloring character sequences.
180180
181181
Returns:
182182
The retrieved log as a context-managed streaming `Response`, or None, if it does not exist.

src/apify_client/clients/resource_clients/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def wait_for_finish(self, *, wait_secs: int | None = None) -> dict | None:
109109
wait_secs: How long does the client wait for run to finish. None for indefinite.
110110
111111
Returns:
112-
The Actor run data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED,
112+
The Actor run data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED,
113113
TIMED_OUT, ABORTED), then the run has not yet finished.
114114
"""
115115
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:
424424
wait_secs: How long does the client wait for run to finish. None for indefinite.
425425
426426
Returns:
427-
The Actor run data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED,
427+
The Actor run data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED,
428428
TIMED_OUT, ABORTED), then the run has not yet finished.
429429
"""
430430
return await self._wait_for_finish(wait_secs=wait_secs)

tests/integration/test_run_collection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class TestRunCollectionSync:
2020
def setup_runs(self, apify_client: ApifyClient) -> None:
2121
self.created_runs = []
2222

23-
successfull_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call()
24-
if successfull_run is not None:
25-
self.created_runs.append(successfull_run)
23+
successful_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call()
24+
if successful_run is not None:
25+
self.created_runs.append(successful_run)
2626

2727
timed_out_run = apify_client.actor(self.APIFY_HELLO_WORLD_ACTOR).call(timeout_secs=1)
2828
if timed_out_run is not None:

tests/unit/test_logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ async def test_actor_call_redirect_logs_to_default_logger_async(
267267
with caplog.at_level(logging.DEBUG, logger=logger_name):
268268
await actor_client.call()
269269

270-
# Ensure expected handler and formater
270+
# Ensure expected handler and formatter
271271
assert isinstance(logger.handlers[0].formatter, RedirectLogFormatter)
272272
assert isinstance(logger.handlers[0], logging.StreamHandler)
273273

@@ -294,7 +294,7 @@ def test_actor_call_redirect_logs_to_default_logger_sync(
294294
with caplog.at_level(logging.DEBUG, logger=logger_name):
295295
actor_client.call()
296296

297-
# Ensure expected handler and formater
297+
# Ensure expected handler and formatter
298298
assert isinstance(logger.handlers[0].formatter, RedirectLogFormatter)
299299
assert isinstance(logger.handlers[0], logging.StreamHandler)
300300

0 commit comments

Comments
 (0)