Skip to content
Snippets Groups Projects
Verified Commit d1cc881c authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: A few docstring

parent aa682c94
No related branches found
No related tags found
1 merge request!123TEST: xfail for issue 111
Pipeline #44106 failed
......@@ -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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment