mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 20:09:01 +00:00
community[patch]: BaseLoader load method should just delegate to lazy_load (#18289)
load() should just reference lazy_load()
This commit is contained in:
@@ -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"),
|
||||
|
Reference in New Issue
Block a user