Skip to content
Snippets Groups Projects
Commit 031cdd39 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

ENH: fixed typing issues in apiutils

parent 2f9da362
No related branches found
No related tags found
2 merge requests!57RELEASE 0.7.3,!52F refactor high level api
......@@ -33,6 +33,8 @@ import warnings
from collections.abc import Iterable
from subprocess import call
from typing import Optional, Any
from caosdb.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER,
REFERENCE, TEXT, is_reference)
from caosdb.common.models import (Container, Entity, File, Property, Query,
......@@ -205,8 +207,8 @@ def compare_entities(old_entity: Entity, new_entity: Entity):
In case of changed information the value listed under the respective key shows the
value that is stored in the respective entity.
"""
olddiff = {"properties": {}, "parents": []}
newdiff = {"properties": {}, "parents": []}
olddiff: dict[str, Any] = {"properties": {}, "parents": []}
newdiff: dict[str, Any] = {"properties": {}, "parents": []}
if old_entity is new_entity:
return (olddiff, newdiff)
......@@ -307,6 +309,7 @@ def copy_entity(entity: Entity):
If deep == True return a deep copy, recursively copying all sub entities.
"""
print(entity)
new: Optional[Entity] = None
if entity.role == "File":
new = File()
elif entity.role == "Property":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment