From d1cc881c4787b2466a368e3ec5bf44a066cb28f6 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Fri, 17 Nov 2023 12:28:21 +0100 Subject: [PATCH] DOC: A few docstring --- src/linkahead/common/datatype.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/linkahead/common/datatype.py b/src/linkahead/common/datatype.py index 7bb0fb23..c0c15fec 100644 --- a/src/linkahead/common/datatype.py +++ b/src/linkahead/common/datatype.py @@ -37,6 +37,7 @@ BOOLEAN = "BOOLEAN" def LIST(datatype): + # FIXME May be ambiguous (if name duplicate) or insufficient (if only ID exists). if hasattr(datatype, "name"): datatype = datatype.name @@ -44,7 +45,8 @@ def LIST(datatype): def get_list_datatype(datatype: str, strict: bool = False): - """ returns the datatype of the elements in the list """ + """Returns the datatype of the elements in the list. If it not a list, return None.""" + # TODO Union[str, Entity] if not isinstance(datatype, str) or not datatype.lower().startswith("list"): if strict: raise ValueError(f"Not a list dtype: {datatype}") -- GitLab