Skip to content

Commit 221a848

Browse files
authored
chore: Fix typos (#1539)
based on the https://github.com/crate-ci/typos, we can integrate it into CI later (but expect false positives).
1 parent f48f039 commit 221a848

File tree

10 files changed

+17
-16
lines changed

10 files changed

+17
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ All notable changes to this project will be documented in this file.
282282

283283
### 🐛 Bug Fixes
284284

285-
- Fix session managment with retire ([#947](https://github.com/apify/crawlee-python/pull/947)) ([caee03f](https://github.com/apify/crawlee-python/commit/caee03fe3a43cc1d7a8d3f9e19b42df1bdb1c0aa)) by [@Mantisus](https://github.com/Mantisus)
285+
- Fix session management with retire ([#947](https://github.com/apify/crawlee-python/pull/947)) ([caee03f](https://github.com/apify/crawlee-python/commit/caee03fe3a43cc1d7a8d3f9e19b42df1bdb1c0aa)) by [@Mantisus](https://github.com/Mantisus)
286286
- Fix templates - poetry-plugin-export version and camoufox template name ([#952](https://github.com/apify/crawlee-python/pull/952)) ([7addea6](https://github.com/apify/crawlee-python/commit/7addea6605359cceba208e16ec9131724bdb3e9b)) by [@Pijukatel](https://github.com/Pijukatel), closes [#951](https://github.com/apify/crawlee-python/issues/951)
287287
- Fix convert relative link to absolute in `enqueue_links` for response with redirect ([#956](https://github.com/apify/crawlee-python/pull/956)) ([694102e](https://github.com/apify/crawlee-python/commit/694102e163bb9021a4830d2545d153f6f8f3de90)) by [@Mantisus](https://github.com/Mantisus), closes [#955](https://github.com/apify/crawlee-python/issues/955)
288288
- Fix `CurlImpersonateHttpClient` cookies handler ([#946](https://github.com/apify/crawlee-python/pull/946)) ([ed415c4](https://github.com/apify/crawlee-python/commit/ed415c433da2a40b0ee62534f0730d0737e991b8)) by [@Mantisus](https://github.com/Mantisus)
@@ -688,4 +688,4 @@ All notable changes to this project will be documented in this file.
688688
- Storage manager & purging the defaults ([#150](https://github.com/apify/crawlee-python/pull/150)) ([851042f](https://github.com/apify/crawlee-python/commit/851042f25ad07e25651768e476f098ef0ed21914)) by [@vdusek](https://github.com/vdusek)
689689

690690

691-
<!-- generated by git-cliff -->
691+
<!-- generated by git-cliff -->

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ make run-docs
103103
Publishing new versions to [PyPI](https://pypi.org/project/crawlee) is automated through GitHub Actions.
104104

105105
- **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.
106-
- **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.
106+
- **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.
107107

108108
### Publishing to PyPI manually
109109

docs/deployment/apify_platform.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ apify run
9999
For running Crawlee code as an Actor on [Apify platform](https://apify.com/actors) you need to wrap the body of the main function of your crawler with `async with Actor`.
100100

101101
:::info NOTE
102-
Adding `async with Actor` is the only important thing needed to run it on Apify platform as an Actor. It is needed to initialize your Actor (e.g. to set the correct storage implementation) and to correctly handle exitting the process.
102+
Adding `async with Actor` is the only important thing needed to run it on Apify platform as an Actor. It is needed to initialize your Actor (e.g. to set the correct storage implementation) and to correctly handle exiting the process.
103103
:::
104104

105105
Let's look at the `BeautifulSoupCrawler` example from the [Quick start](../quick-start) guide:

docs/examples/playwright_crawler_with_fingerprint_generator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
id: playwright-crawler-with-fingeprint-generator
2+
id: playwright-crawler-with-fingerprint-generator
33
title: Playwright crawler with fingerprint generator
44
---
55

docs/guides/trace_and_monitor_crawlers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can use different tools to consume the OpenTelemetry data that might better
4545

4646
## Customize the instrumentation
4747

48-
You can customize the <ApiLink to="class/CrawlerInstrumentor">`CrawlerInstrumentor`</ApiLink>. Depending on the arguments used during its initialization, the instrumentation will be applied to different parts ot the Crawlee code. By default, it instruments some functions that can give quite a good picture of each individual request handling. To turn this default instrumentation off, you can pass `request_handling_instrumentation=False` during initialization. You can also extend instrumentation by passing `instrument_classes=[...]` initialization argument that contains classes you want to be auto-instrumented. All their public methods will be automatically instrumented. Bear in mind that instrumentation has some runtime costs as well. The more instrumentation is used, the more overhead it will add to the crawler execution.
48+
You can customize the <ApiLink to="class/CrawlerInstrumentor">`CrawlerInstrumentor`</ApiLink>. Depending on the arguments used during its initialization, the instrumentation will be applied to different parts of the Crawlee code. By default, it instruments some functions that can give quite a good picture of each individual request handling. To turn this default instrumentation off, you can pass `request_handling_instrumentation=False` during initialization. You can also extend instrumentation by passing `instrument_classes=[...]` initialization argument that contains classes you want to be auto-instrumented. All their public methods will be automatically instrumented. Bear in mind that instrumentation has some runtime costs as well. The more instrumentation is used, the more overhead it will add to the crawler execution.
4949

5050
You can also create your instrumentation by selecting only the methods you want to instrument. For more details, see the <ApiLink to="class/CrawlerInstrumentor">`CrawlerInstrumentor`</ApiLink> source code and the [Python documentation for OpenTelemetry](https://opentelemetry.io/docs/languages/python/).
5151

src/crawlee/otel/crawler_instrumentor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _init_wrapper(wrapped: Any, _: Any, args: Any, kwargs: Any) -> None:
6969

7070
if request_handling_instrumentation:
7171

72-
async def middlware_wrapper(wrapped: Any, instance: _Middleware, args: Any, kwargs: Any) -> Any:
72+
async def middleware_wrapper(wrapped: Any, instance: _Middleware, args: Any, kwargs: Any) -> Any:
7373
with self._tracer.start_as_current_span(
7474
name=f'{instance.generator.__name__}, {wrapped.__name__}', # type:ignore[attr-defined] # valid in our context
7575
attributes={
@@ -111,8 +111,8 @@ async def _commit_request_handler_result_wrapper(
111111
# Handpicked interesting methods to instrument
112112
self._instrumented.extend(
113113
[
114-
(_Middleware, 'action', middlware_wrapper),
115-
(_Middleware, 'cleanup', middlware_wrapper),
114+
(_Middleware, 'action', middleware_wrapper),
115+
(_Middleware, 'cleanup', middleware_wrapper),
116116
(ContextPipeline, '__call__', context_pipeline_wrapper),
117117
(BasicCrawler, '_BasicCrawler__run_task_function', self._simple_async_wrapper),
118118
(BasicCrawler, '_commit_request_handler_result', _commit_request_handler_result_wrapper),

src/crawlee/sessions/_session_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_state(self, *, as_dict: bool = False) -> SessionPoolModel | dict:
163163
def add_session(self, session: Session) -> None:
164164
"""Add an externally created session to the pool.
165165
166-
This is intened only for the cases when you want to add a session that was created outside of the pool.
166+
This is intended only for the cases when you want to add a session that was created outside of the pool.
167167
Otherwise, the pool will create new sessions automatically.
168168
169169
Args:

tests/e2e/project_template/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def _patch_crawlee_version_in_pyproject_toml_based_project(project_path: Path, w
7777
else:
7878
raise RuntimeError('This does not look like a uv or poetry based project.')
7979

80-
# Create lock file that is expected by the docker to exist(Even though it wil be patched in the docker).
80+
# Create lock file that is expected by the docker to exist (even though it will be patched
81+
# in the docker).
8182
subprocess.run(
8283
args=[package_manager, 'lock'],
8384
cwd=str(project_path),
@@ -87,7 +88,7 @@ def _patch_crawlee_version_in_pyproject_toml_based_project(project_path: Path, w
8788

8889
# Add command to copy .whl to the docker image and update project with it.
8990
# Patching in docker file due to the poetry not properly supporting relative paths for wheel packages
90-
# and so the absolute path(in the container) is generated when running `add` command in the container.
91+
# and so the absolute path (in the container) is generated when running `add` command in the container.
9192
modified_lines.extend(
9293
[
9394
f'COPY {wheel_path.name} ./\n',

tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ async def test_adaptive_context_query_selector_beautiful_soup(test_urls: list[st
568568
Handler tries to locate two elements h1 and h2.
569569
h1 exists immediately, h2 is created dynamically by inline JS snippet embedded in the html.
570570
Create situation where page is crawled with static sub crawler first.
571-
Static sub crawler should be able to locate only h1. It wil try to wait for h2, trying to wait for h2 will trigger
571+
Static sub crawler should be able to locate only h1. It will try to wait for h2, trying to wait for h2 will trigger
572572
`AdaptiveContextError` which will force the adaptive crawler to try playwright sub crawler instead. Playwright sub
573573
crawler is able to wait for the h2 element."""
574574

@@ -610,7 +610,7 @@ async def test_adaptive_context_query_selector_parsel(test_urls: list[str]) -> N
610610
Handler tries to locate two elements h1 and h2.
611611
h1 exists immediately, h2 is created dynamically by inline JS snippet embedded in the html.
612612
Create situation where page is crawled with static sub crawler first.
613-
Static sub crawler should be able to locate only h1. It wil try to wait for h2, trying to wait for h2 will trigger
613+
Static sub crawler should be able to locate only h1. It will try to wait for h2, trying to wait for h2 will trigger
614614
`AdaptiveContextError` which will force the adaptive crawler to try playwright sub crawler instead. Playwright sub
615615
crawler is able to wait for the h2 element."""
616616

tests/unit/crawlers/_basic/test_basic_crawler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ async def error_handler(context: BasicCrawlingContext, error: Exception) -> Requ
228228
assert isinstance(error_call.error, RuntimeError)
229229

230230

231-
async def test_calls_error_handler_for_sesion_errors() -> None:
231+
async def test_calls_error_handler_for_session_errors() -> None:
232232
crawler = BasicCrawler(
233233
max_session_rotations=1,
234234
)
@@ -1045,7 +1045,7 @@ async def handler(context: BasicCrawlingContext) -> None:
10451045
assert stats.requests_finished == 2
10461046

10471047

1048-
async def test_services_no_side_effet_on_crawler_init() -> None:
1048+
async def test_services_no_side_effect_on_crawler_init() -> None:
10491049
custom_configuration = Configuration()
10501050
custom_event_manager = LocalEventManager.from_config(custom_configuration)
10511051
custom_storage_client = MemoryStorageClient()

0 commit comments

Comments
 (0)