Skip to content
Snippets Groups Projects
Commit a82bc1cc authored by Alexander Kreft's avatar Alexander Kreft
Browse files

MAINT: order of description setter

parent 7b9bc313
Branches
Tags
2 merge requests!143Release 0.15.0,!67Add type hints to models.py
...@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment