crawlee-python
crawlee-python copied to clipboard
pylance reportPrivateImportUsage
When using VS Code, pylance (v2024.7.1, latest) frequently reports reportPrivateImportUsage
errors when importing classes.
These errors can be fixed by defining a __all__
list in the module's __init__.py
file, which explicitly declares the public names for the module.
Here's an example for the http_crawler
module:
from .http_crawler import HttpCrawler
from .types import HttpCrawlingContext, HttpCrawlingResult
__all__ = ["HttpCrawler", "HttpCrawlingContext", "HttpCrawlingResult"]