From ff59b99162e9b8a7bc204553c864d65ebde9b9d0 Mon Sep 17 00:00:00 2001 From: Daniel <daniel@harvey> Date: Wed, 25 Sep 2019 17:42:11 +0200 Subject: [PATCH] STYLE: Whitespace cleanup --- src/caosdb/common/models.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index 9c420c8c..86a281b1 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -388,7 +388,7 @@ class Entity(object): self.properties.append( property=new_property, importance=( kwargs['importance'] if 'importance' in kwargs else None), inheritance=( - kwargs['inheritance'] if 'inheritance' in kwargs else None)) + kwargs['inheritance'] if 'inheritance' in kwargs else None)) return self @@ -478,11 +478,11 @@ class Entity(object): name_result = ( not check_name or (parent.name is not None and - parent.name in [pp.name for pp in parents])) + parent.name in [pp.name for pp in parents])) id_result = ( not check_id or (parent.id is not None and - parent.id in [pp.id for pp in parents])) + parent.id in [pp.id for pp in parents])) return name_result and id_result @@ -2489,8 +2489,8 @@ class Container(list): for remote_entity in remote_container: if remote_entity.path is not None and str( remote_entity.path) == ( - local_entity.path if local_entity.path.startswith("/") else "/" + - local_entity.path) and remote_entity not in used_remote_entities: + local_entity.path if local_entity.path.startswith("/") else "/" + + local_entity.path) and remote_entity not in used_remote_entities: sync_remote_entities.append(remote_entity) used_remote_entities.append(remote_entity) @@ -2514,16 +2514,13 @@ class Container(list): for remote_entity in remote_container: if remote_entity.name is not None \ - and ( - str(remote_entity.name) == str( - local_entity.name) or - ( - name_case_sensitive is False and - str(remote_entity.name).lower() == str( - local_entity.name).lower() - ) - ) \ - and remote_entity not in used_remote_entities: + and (str(remote_entity.name) == str(local_entity.name) or + (name_case_sensitive is False and + str(remote_entity.name).lower() == str( + local_entity.name).lower() + ) + ) \ + and remote_entity not in used_remote_entities: sync_remote_entities.append(remote_entity) used_remote_entities.append(remote_entity) -- GitLab