community[patch]: BaseLoader load method should just delegate to lazy_load (#18289)

load() should just reference lazy_load()
This commit is contained in:
Eugene Yurtsev
2024-02-29 21:45:28 -05:00
committed by GitHub
parent 5efb5c099f
commit 51b661cfe8
2 changed files with 7 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
"""Test Base Schema of documents."""
from typing import Iterator, List
from typing import Iterator
from langchain_core.documents import Document
@@ -31,9 +31,6 @@ def test_base_blob_parser() -> None:
async def test_default_aload() -> None:
class FakeLoader(BaseLoader):
def load(self) -> List[Document]:
return list(self.lazy_load())
def lazy_load(self) -> Iterator[Document]:
yield from [
Document(page_content="foo"),