From 8f97d675d5dff75cda2e85a5b57b50a2f5955af6 Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Wed, 8 Apr 2026 23:13:05 +0800 Subject: [PATCH] fix: narrow arun return type hint --- crawl4ai/async_webcrawler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crawl4ai/async_webcrawler.py b/crawl4ai/async_webcrawler.py index 36b999fd1..80775eb2b 100644 --- a/crawl4ai/async_webcrawler.py +++ b/crawl4ai/async_webcrawler.py @@ -210,7 +210,7 @@ async def arun( url: str, config: CrawlerRunConfig = None, **kwargs, - ) -> RunManyReturn: + ) -> CrawlResultContainer[CrawlResult]: """ Runs the crawler for a single source: URL (web, local file, or raw HTML). @@ -237,7 +237,8 @@ async def arun( [other parameters maintained for backwards compatibility] Returns: - CrawlResult: The result of crawling and processing + CrawlResultContainer[CrawlResult]: A single-result container that proxies + attribute access to the underlying CrawlResult for backwards compatibility. """ # Auto-start if not ready if not self.ready: