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

STY: autopep8

parent edc39b3e
Branches
Tags
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, ...@@ -447,7 +447,7 @@ def compare_entities(entity0: Optional[Entity] = None,
return diff return diff
def empty_diff(entity0: Entity, def empty_diff(entity0: Entity,
entity1: Entity, entity1: Entity,
compare_referenced_records: bool = False, compare_referenced_records: bool = False,
entity_name_id_equivalency: bool = False, entity_name_id_equivalency: bool = False,
...@@ -484,7 +484,7 @@ def empty_diff(entity0: Entity, ...@@ -484,7 +484,7 @@ def empty_diff(entity0: Entity,
if entity1 is not None: if entity1 is not None:
raise ValueError("You cannot use both entity1 and new_entity") raise ValueError("You cannot use both entity1 and new_entity")
entity1 = 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) entity_name_id_equivalency)
for diff in [e0diff, e1diff]: for diff in [e0diff, e1diff]:
for key in ["parents", "properties"]: for key in ["parents", "properties"]:
...@@ -689,10 +689,10 @@ def describe_diff(entity0_diff: dict[str, Any], entity1_diff: dict[str, Any], ...@@ -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) warnings.warn("'as_update' is deprecated. Do not use it.", DeprecationWarning)
if olddiff: if olddiff:
warnings.warn("'olddiff' is deprecated. Use 'entity0_diff' instead.", DeprecationWarning) warnings.warn("'olddiff' is deprecated. Use 'entity0_diff' instead.", DeprecationWarning)
entity0_diff=olddiff entity0_diff = olddiff
if newdiff: if newdiff:
warnings.warn("'newdiff' is deprecated. Use 'entity1_diff' instead.", DeprecationWarning) 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()))): for attr in list(set(list(entity0_diff.keys()) + list(entity1_diff.keys()))):
if attr == "parents" or attr == "properties": if attr == "parents" or attr == "properties":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment