From 81fe77e5ed296dd71fda065a1245d9118c633021 Mon Sep 17 00:00:00 2001 From: Jan Heinrich Merker Date: Fri, 1 Nov 2024 20:54:23 +0100 Subject: [PATCH] Fix typing --- chatnoir_api/model/result.py | 2 +- chatnoir_api/v1/model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chatnoir_api/model/result.py b/chatnoir_api/model/result.py index 5fa419e..179178a 100644 --- a/chatnoir_api/model/result.py +++ b/chatnoir_api/model/result.py @@ -22,7 +22,7 @@ class MinimalResult(ABC): score: float uuid: UUID - target_uri: str | None + target_uri: Optional[str] snippet: HighlightedText index: Index title: HighlightedText diff --git a/chatnoir_api/v1/model.py b/chatnoir_api/v1/model.py index 64dafb1..a29282f 100644 --- a/chatnoir_api/v1/model.py +++ b/chatnoir_api/v1/model.py @@ -43,7 +43,7 @@ class PhraseRequest(Request, DataClassJsonMixin): class MinimalResultResponse(MinimalResult, DataClassJsonMixin): score: float uuid: UUID = field(metadata=config(decoder=decode_uuid)) - target_uri: str | None + target_uri: Optional[str] snippet: HighlightedText = field(metadata=config(decoder=HighlightedText)) index: Index = field(metadata=config(decoder=parse_index)) title: HighlightedText = field(