mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 00:11:17 +00:00
community[patch]: Fix remaining __inits__ in community (#22037)
Fixes the __init__ files in community to use __all__ which is statically defined.
This commit is contained in:
@@ -1,5 +1,36 @@
|
||||
import importlib
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langchain_community.document_loaders.parsers.audio import (
|
||||
OpenAIWhisperParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.doc_intelligence import (
|
||||
AzureAIDocumentIntelligenceParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.docai import (
|
||||
DocAIParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.grobid import (
|
||||
GrobidParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.html import (
|
||||
BS4HTMLParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.language import (
|
||||
LanguageParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.pdf import (
|
||||
PDFMinerParser,
|
||||
PDFPlumberParser,
|
||||
PyMuPDFParser,
|
||||
PyPDFium2Parser,
|
||||
PyPDFParser,
|
||||
)
|
||||
from langchain_community.document_loaders.parsers.vsdx import (
|
||||
VsdxParser,
|
||||
)
|
||||
|
||||
|
||||
_module_lookup = {
|
||||
"AzureAIDocumentIntelligenceParser": "langchain_community.document_loaders.parsers.doc_intelligence", # noqa: E501
|
||||
@@ -24,4 +55,17 @@ def __getattr__(name: str) -> Any:
|
||||
raise AttributeError(f"module {__name__} has no attribute {name}")
|
||||
|
||||
|
||||
__all__ = list(_module_lookup.keys())
|
||||
__all__ = [
|
||||
"AzureAIDocumentIntelligenceParser",
|
||||
"BS4HTMLParser",
|
||||
"DocAIParser",
|
||||
"GrobidParser",
|
||||
"LanguageParser",
|
||||
"OpenAIWhisperParser",
|
||||
"PDFMinerParser",
|
||||
"PDFPlumberParser",
|
||||
"PyMuPDFParser",
|
||||
"PyPDFParser",
|
||||
"PyPDFium2Parser",
|
||||
"VsdxParser",
|
||||
]
|
||||
|
Reference in New Issue
Block a user