Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
d1cc881c
Verified
Commit
d1cc881c
authored
1 year ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
DOC: A few docstring
parent
aa682c94
No related branches found
No related tags found
1 merge request
!123
TEST: xfail for issue 111
Pipeline
#44106
failed
1 year ago
Stage: code_style
Stage: linting
Stage: setup
Stage: test
Stage: deploy
Changes
1
Pipelines
8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/linkahead/common/datatype.py
+3
-1
3 additions, 1 deletion
src/linkahead/common/datatype.py
with
3 additions
and
1 deletion
src/linkahead/common/datatype.py
+
3
−
1
View file @
d1cc881c
...
...
@@ -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
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment