Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/type ignore fixes #18395

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/community/langchain_community/chat_models/kinetica.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def to_system_str(self) -> str:
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def load(self) -> List[Document]:
loader = AzureBlobStorageFileLoader(
self.conn_str,
self.container,
blob.name, # type: ignore
blob.name,
)
docs.extend(loader.load())
return docs
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,16 @@ def _get_attachments(self, soup: Any) -> List[str]:
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("#"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def process_page(
)
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 "
Expand Down
Loading