mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-31 16:39:20 +00:00
parent
69be82c86d
commit
7d962278f6
@ -50,7 +50,7 @@ class _KdtSuggestContext(BaseModel):
|
||||
lines.append("(")
|
||||
|
||||
if not self.columns or len(self.columns) == 0:
|
||||
ValueError(detail="columns list can't be null.") # type: ignore
|
||||
ValueError("columns list can't be null.")
|
||||
|
||||
columns = []
|
||||
for column in self.columns:
|
||||
|
@ -39,7 +39,7 @@ class AzureBlobStorageContainerLoader(BaseLoader):
|
||||
loader = AzureBlobStorageFileLoader(
|
||||
self.conn_str,
|
||||
self.container,
|
||||
blob.name, # type: ignore
|
||||
blob.name,
|
||||
)
|
||||
docs.extend(loader.load())
|
||||
return docs
|
||||
|
@ -176,16 +176,16 @@ class BlackboardLoader(WebBaseLoader):
|
||||
from bs4 import BeautifulSoup, Tag
|
||||
|
||||
# Get content list
|
||||
content_list: BeautifulSoup
|
||||
content_list = soup.find("ul", {"class": "contentList"})
|
||||
if content_list is None:
|
||||
raise ValueError("No content list found.")
|
||||
content_list: BeautifulSoup # type: ignore
|
||||
# Get all attachments
|
||||
attachments = []
|
||||
attachment: Tag
|
||||
for attachment in content_list.find_all("ul", {"class": "attachments"}):
|
||||
attachment: Tag # type: ignore
|
||||
link: Tag
|
||||
for link in attachment.find_all("a"):
|
||||
link: Tag # type: ignore
|
||||
href = link.get("href")
|
||||
# Only add if href is not None and does not start with #
|
||||
if href is not None and not href.startswith("#"):
|
||||
|
@ -469,7 +469,7 @@ class ConfluenceLoader(BaseLoader):
|
||||
)
|
||||
if include_comments or not keep_markdown_format:
|
||||
try:
|
||||
from bs4 import BeautifulSoup # type: ignore
|
||||
from bs4 import BeautifulSoup
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
"`beautifulsoup4` package not found, please run "
|
||||
|
Loading…
Reference in New Issue
Block a user