Skip to content

Commit

Permalink
Add return type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Jun 11, 2024
1 parent 932f9cd commit 9c49ea5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions abcd/backends/atoms_opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9c49ea5

Please sign in to comment.