Skip to content

Conversation

@YuriNachos
Copy link

🎯 Summary

Fixes #1543

📝 Description

The documentation was incorrectly stating that arun() returns CrawlResult and arun_many() returns Union[List[CrawlResult], AsyncGenerator[CrawlResult, None]]. However, both methods actually return RunManyReturn, causing issues with IDE auto-completion and type hints.

🔧 Changes

  • docs/md_v2/api/async-webcrawler.md:

    • Changed arun() return type from CrawlResult to RunManyReturn
    • Changed arun_many() return type from List[CrawlResult] to RunManyReturn
  • docs/md_v2/api/arun_many.md:

    • Changed function signature return type from Union[List[CrawlResult], AsyncGenerator[CrawlResult, None]] to RunManyReturn
    • Updated docstring and descriptions to reflect that RunManyReturn contains either a list of results or an async generator

✅ Actual Return Types (from source code)

# crawl4ai/async_webcrawler.py:204
async def arun(...) -> RunManyReturn:

# crawl4ai/async_webcrawler.py:665
async def arun_many(...) -> RunManyReturn:

Co-Authored-By: Claude [email protected]

Fixes unclecode#1543

The documentation was incorrectly stating that:
- arun() returns CrawlResult
- arun_many() returns Union[List[CrawlResult], AsyncGenerator[CrawlResult, None]]

However, both methods actually return RunManyReturn. This caused
issues with IDE auto-completion and type hints.

Updated:
- docs/md_v2/api/async-webcrawler.md: Fixed return type for arun() and arun_many()
- docs/md_v2/api/arun_many.md: Fixed return type and related descriptions

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Outdated Documentation regarding arun and arun_many return type

1 participant