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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
a82bc1cc
Commit
a82bc1cc
authored
Oct 27, 2021
by
Alexander Kreft
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: order of description setter
parent
7b9bc313
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!143
Release 0.15.0
,
!67
Add type hints to models.py
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosdb/common/models.py
+7
-6
7 additions, 6 deletions
src/caosdb/common/models.py
with
7 additions
and
6 deletions
src/caosdb/common/models.py
+
7
−
6
View file @
a82bc1cc
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#
#
"""
missing docstring.
"""
"""
missing docstring.
"""
from
__future__
import
print_function
,
unicode_literals
from
__future__
import
annotations
,
print_function
,
unicode_literals
import
re
import
re
import
sys
import
sys
...
@@ -39,6 +39,7 @@ from os.path import isdir
...
@@ -39,6 +39,7 @@ from os.path import isdir
from
random
import
randint
from
random
import
randint
from
sys
import
hexversion
from
sys
import
hexversion
from
tempfile
import
NamedTemporaryFile
from
tempfile
import
NamedTemporaryFile
from
typing
import
Any
,
Literal
,
Optional
,
Type
,
Union
from
warnings
import
warn
from
warnings
import
warn
from
caosdb.common.datatype
import
(
BOOLEAN
,
DATETIME
,
DOUBLE
,
INTEGER
,
TEXT
,
from
caosdb.common.datatype
import
(
BOOLEAN
,
DATETIME
,
DOUBLE
,
INTEGER
,
TEXT
,
...
@@ -58,7 +59,7 @@ from caosdb.exceptions import (AmbiguousEntityError, AuthorizationError,
...
@@ -58,7 +59,7 @@ from caosdb.exceptions import (AmbiguousEntityError, AuthorizationError,
TransactionError
,
UniqueNamesError
,
TransactionError
,
UniqueNamesError
,
UnqualifiedParentsError
,
UnqualifiedParentsError
,
UnqualifiedPropertiesError
)
UnqualifiedPropertiesError
)
from
lxml
import
etree
from
lxml
import
etree
# type: ignore
_ENTITY_URI_SEGMENT
=
"
Entity
"
_ENTITY_URI_SEGMENT
=
"
Entity
"
...
@@ -193,14 +194,14 @@ class Entity(object):
...
@@ -193,14 +194,14 @@ class Entity(object):
return
self
.
_wrapped_entity
.
description
return
self
.
_wrapped_entity
.
description
@property
def
checksum
(
self
):
return
self
.
_checksum
@description.setter
@description.setter
def
description
(
self
,
new_description
):
def
description
(
self
,
new_description
):
self
.
__description
=
new_description
self
.
__description
=
new_description
@property
def
checksum
(
self
):
return
self
.
_checksum
@property
@property
def
unit
(
self
):
def
unit
(
self
):
if
self
.
__unit
is
not
None
or
self
.
_wrapped_entity
is
None
:
if
self
.
__unit
is
not
None
or
self
.
_wrapped_entity
is
None
:
...
...
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