From 9c49ea56a2ffcaa57f63e5c6cab9d2f4fd04a504 Mon Sep 17 00:00:00 2001 From: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com> Date: Tue, 11 Jun 2024 08:50:25 +0100 Subject: [PATCH] Add return type hint --- abcd/backends/atoms_opensearch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/abcd/backends/atoms_opensearch.py b/abcd/backends/atoms_opensearch.py index f623d06b..39844a43 100644 --- a/abcd/backends/atoms_opensearch.py +++ b/abcd/backends/atoms_opensearch.py @@ -174,13 +174,14 @@ def from_atoms( return obj @property - def _id(self): + def _id(self) -> Union[str, None]: """ - Gets the OpenSearch document ID stored in data. + Get the OpenSearch document ID stored in data. Returns ------- - Current document ID. + Union[str, None] + Current document ID. """ return self.get("_id", None)