mypy fixes

This commit is contained in:
Weves 2024-02-27 15:54:19 -08:00 committed by Chris Weaver
parent 3941111685
commit cd198ba368
2 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,7 @@ from danswer.connectors.interfaces import GenerateDocumentsOutput
from danswer.connectors.interfaces import LoadConnector
from danswer.connectors.interfaces import PollConnector
from danswer.connectors.interfaces import SecondsSinceUnixEpoch
from danswer.connectors.models import BasicExpertInfo
from danswer.connectors.models import ConnectorMissingCredentialError
from danswer.connectors.models import Document
from danswer.connectors.models import Section
@ -130,7 +131,9 @@ class Document360Connector(LoadConnector, PollConnector):
continue
authors = [
{"name": author.get("name", "Unknown"), "email": author["email_id"]}
BasicExpertInfo(
display_name=author.get("name"), email=author["email_id"]
)
for author in article_details.get("authors", [])
if author["email_id"]
]

View File

@ -249,7 +249,7 @@ def semantic_reranking(
rerank_metrics_callback(
RerankMetricsContainer(
metrics=chunk_metrics, raw_similarity_scores=ranked_raw_scores
metrics=chunk_metrics, raw_similarity_scores=ranked_raw_scores # type: ignore
)
)