mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
fix mypy
This commit is contained in:
parent
536079f746
commit
eda4108d20
@ -50,7 +50,8 @@ def oneoff_standard_answers(
|
||||
)
|
||||
|
||||
server_standard_answers = [
|
||||
StandardAnswer.from_model(db_answer) for db_answer in matching_standard_answers
|
||||
StandardAnswer.from_model(db_answer[0])
|
||||
for db_answer in matching_standard_answers
|
||||
]
|
||||
return server_standard_answers
|
||||
|
||||
|
@ -182,7 +182,7 @@ def find_matching_standard_answers(
|
||||
id_in: list[int],
|
||||
query: str,
|
||||
db_session: Session,
|
||||
) -> list[(StandardAnswer, bool)]:
|
||||
) -> list[tuple[StandardAnswer, bool]]:
|
||||
"""
|
||||
Returns a list of tuples, where each tuple contains a StandardAnswer and a boolean
|
||||
indicating if the query is a regex match.
|
||||
@ -194,7 +194,7 @@ def find_matching_standard_answers(
|
||||
)
|
||||
possible_standard_answers = db_session.scalars(stmt).all()
|
||||
|
||||
matching_standard_answers: list[StandardAnswer] = []
|
||||
matching_standard_answers: list[tuple[StandardAnswer, bool]] = []
|
||||
for standard_answer in possible_standard_answers:
|
||||
# Remove punctuation and split the keyword into individual words
|
||||
keyword_words = "".join(
|
||||
|
Loading…
x
Reference in New Issue
Block a user