From 654a8b44f0f381ac4af523450cfefc0efec27e0c Mon Sep 17 00:00:00 2001 From: maaikedieuwertje <maaikedieuwertje@gmail.com> Date: Sat, 10 Mar 2018 15:11:47 +0100 Subject: [PATCH] minor indent mishaps Former-commit-id: 27621ed018b685d6c2a84208088e14234986fe1e --- kadmos/cmdows/cmdows.py | 4 ++-- kadmos/graph/graph_data.py | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/kadmos/cmdows/cmdows.py b/kadmos/cmdows/cmdows.py index d06baccd2..6669e1b4d 100644 --- a/kadmos/cmdows/cmdows.py +++ b/kadmos/cmdows/cmdows.py @@ -378,9 +378,9 @@ class CMDOWS(object): def add_dc_general_info(self, dc_uid, description, dc_instance, status=None, creation_date=None, owner_uid=None, creator_uid=None, operator_uid=None, model_definition=None): - """Method to add a general info element to a dc branch.""" + """Method to add a general info element to a dc branch.""" # if instance is higher than 1 the metadata should not be added. - # Assert that there is a DC element + # Assert that there is a DC element xpath = self.get_xpath_of_uid(dc_uid, expected_tag='designCompetence') # Assert that the contact_uids exist diff --git a/kadmos/graph/graph_data.py b/kadmos/graph/graph_data.py index 8113d217b..7df5476a9 100644 --- a/kadmos/graph/graph_data.py +++ b/kadmos/graph/graph_data.py @@ -322,18 +322,18 @@ class DataGraph(KadmosGraph): assert isinstance(reference_value, (numbers.Number, list)), 'Reference value is not a number or list.' #check if multiple bounds are used correctly. - if isinstance(operator, list): - if (operators[operator[0]](0,1) and operators[operator[1]](1,0)) or ((operators[operator[0]](1,0) and operators[operator[1]](0,1))): - a = reference_value[0] - b = reference_value[1] - if operators[operator[1]](a,b) and operators[operator[0]](b,a): - pass - else: - print("ERROR: x {} {} and x {} {} are not consistent as " + if isinstance(operator, list): + if (operators[operator[0]](0,1) and operators[operator[1]](1,0)) or ((operators[operator[0]](1,0) and operators[operator[1]](0,1))): + a = reference_value[0] + b = reference_value[1] + if operators[operator[1]](a,b) and operators[operator[0]](b,a): + pass + else: + print("ERROR: x {} {} and x {} {} are not consistent as " "bounds".format(operator[0],reference_value[0],operator[1],reference_value[1])) - else: - print("ERROR: the combination of {} and {} as bounds is not logical. " - "Please correct the operators provided".format(operator[0],operator[1])) + else: + print("ERROR: the combination of {} and {} as bounds is not logical. " + "Please correct the operators provided".format(operator[0],operator[1])) # Mark nodes self.node[node]['problem_role'] = self.PROBLEM_ROLES_VARS[2] -- GitLab