diff --git a/src/linkahead/common/datatype.py b/src/linkahead/common/datatype.py index 7bb0fb23393df3fb4fcba3f795264e71a1d7348b..c0c15feca240112f1f8e33a0cd37932151fcd9f0 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}")