mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-07 13:40:46 +00:00
Minor clean up in BlobParser (#4210)
Minor clean up to use `abstractmethod` and `ABC` instead of `abc.abstractmethod` and `abc.ABC`.
This commit is contained in:
parent
04b74d0446
commit
0c646bb703
@ -1,5 +1,4 @@
|
|||||||
"""Abstract interface for document loader implementations."""
|
"""Abstract interface for document loader implementations."""
|
||||||
import abc
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from typing import Iterable, Iterator, List, Optional
|
from typing import Iterable, Iterator, List, Optional
|
||||||
|
|
||||||
@ -47,7 +46,7 @@ class BaseLoader(ABC):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class BaseBlobParser(abc.ABC):
|
class BaseBlobParser(ABC):
|
||||||
"""Abstract interface for blob parsers.
|
"""Abstract interface for blob parsers.
|
||||||
|
|
||||||
A blob parser is provides a way to parse raw data stored in a blob into one
|
A blob parser is provides a way to parse raw data stored in a blob into one
|
||||||
@ -57,7 +56,7 @@ class BaseBlobParser(abc.ABC):
|
|||||||
a parser independent of how the blob was originally loaded.
|
a parser independent of how the blob was originally loaded.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abstractmethod
|
||||||
def lazy_parse(self, blob: Blob) -> Iterator[Document]:
|
def lazy_parse(self, blob: Blob) -> Iterator[Document]:
|
||||||
"""Lazy parsing interface.
|
"""Lazy parsing interface.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user