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

STY: autopep8

parent edc39b3e
No related branches found
No related tags found
2 merge requests!159Release 0.16.o,!154Added the possibility to use custom labels instead of 'old' and 'new'
Pipeline #57485 passed with warnings
......@@ -447,7 +447,7 @@ def compare_entities(entity0: Optional[Entity] = None,
return diff
def empty_diff(entity0: Entity,
def empty_diff(entity0: Entity,
entity1: Entity,
compare_referenced_records: bool = False,
entity_name_id_equivalency: bool = False,
......@@ -484,7 +484,7 @@ def empty_diff(entity0: Entity,
if entity1 is not None:
raise ValueError("You cannot use both entity1 and new_entity")
entity1 = new_entity
e0diff, e1diff = compare_entities(entity0, entity1, compare_referenced_records,
e0diff, e1diff = compare_entities(entity0, entity1, compare_referenced_records,
entity_name_id_equivalency)
for diff in [e0diff, e1diff]:
for key in ["parents", "properties"]:
......@@ -689,10 +689,10 @@ def describe_diff(entity0_diff: dict[str, Any], entity1_diff: dict[str, Any],
warnings.warn("'as_update' is deprecated. Do not use it.", DeprecationWarning)
if olddiff:
warnings.warn("'olddiff' is deprecated. Use 'entity0_diff' instead.", DeprecationWarning)
entity0_diff=olddiff
entity0_diff = olddiff
if newdiff:
warnings.warn("'newdiff' is deprecated. Use 'entity1_diff' instead.", DeprecationWarning)
entity1_diff=newdiff
entity1_diff = newdiff
for attr in list(set(list(entity0_diff.keys()) + list(entity1_diff.keys()))):
if attr == "parents" or attr == "properties":
......
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