Skip to content

Commit efb86a9

Browse files
committed
Remove unused ignoring for ty
1 parent 2d5a571 commit efb86a9

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/crawlee/crawlers/_abstract_http/_abstract_http_crawler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def _create_static_content_crawler_pipeline(self) -> ContextPipeline[ParsedHttpC
120120
ContextPipeline()
121121
.compose(self._execute_pre_navigation_hooks)
122122
.compose(self._make_http_request)
123-
.compose(self._handle_status_code_response) # ty: ignore[invalid-argument-type]
123+
.compose(self._handle_status_code_response)
124124
.compose(self._parse_http_response)
125-
.compose(self._handle_blocked_request_by_content) # ty: ignore[invalid-argument-type]
125+
.compose(self._handle_blocked_request_by_content)
126126
)
127127

128128
async def _execute_pre_navigation_hooks(

src/crawlee/crawlers/_playwright/_playwright_crawler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ def __init__(
198198
kwargs['_context_pipeline'] = (
199199
ContextPipeline()
200200
.compose(self._open_page)
201-
.compose(self._navigate) # ty: ignore[invalid-argument-type]
201+
.compose(self._navigate)
202202
.compose(self._handle_status_code_response)
203-
.compose(self._handle_blocked_request_by_content) # ty: ignore[invalid-argument-type]
203+
.compose(self._handle_blocked_request_by_content)
204204
)
205205
kwargs['_additional_context_managers'] = [self._browser_pool]
206206
kwargs.setdefault('_logger', logging.getLogger(__name__))

tests/unit/crawlers/_basic/test_context_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async def middleware_b(context: EnhancedCrawlingContext) -> AsyncGenerator[MoreE
8888
)
8989
events.append('middleware_b_out')
9090

91-
pipeline = ContextPipeline[BasicCrawlingContext]().compose(middleware_a).compose(middleware_b) # ty: ignore[invalid-argument-type]
91+
pipeline = ContextPipeline[BasicCrawlingContext]().compose(middleware_a).compose(middleware_b)
9292

9393
context = BasicCrawlingContext(
9494
request=Request.from_url(url='https://test.io/'),

tests/unit/crawlers/_parsel/test_parsel_crawler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ async def test_enqueue_links_with_incompatible_kwargs_raises_error(server_url: U
7575
@crawler.router.default_handler
7676
async def request_handler(context: ParselCrawlingContext) -> None:
7777
try:
78-
await context.enqueue_links(requests=[Request.from_url(str(server_url / 'start_enqueue'))], selector='a') # type:ignore[call-overload] # Testing runtime enforcement of the overloads.
78+
# Testing runtime enforcement of the overloads.
79+
await context.enqueue_links(requests=[Request.from_url(str(server_url / 'start_enqueue'))], selector='a')
7980
except Exception as e:
8081
exceptions.append(e)
8182

tests/unit/crawlers/_playwright/test_playwright_crawler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ async def some_hook(context: PlaywrightPreNavCrawlingContext) -> None:
116116
@crawler.router.default_handler
117117
async def request_handler(context: PlaywrightCrawlingContext) -> None:
118118
try:
119-
await context.enqueue_links(requests=[Request.from_url('https://www.whatever.com')], selector='a') # type:ignore[call-overload] # Testing runtime enforcement of the overloads.
119+
# Testing runtime enforcement of the overloads.
120+
await context.enqueue_links(requests=[Request.from_url('https://www.whatever.com')], selector='a')
120121
except Exception as e:
121122
exceptions.append(e)
122123

0 commit comments

Comments
 (0)