From 21acce7d81676613f12f39411516947d14402664 Mon Sep 17 00:00:00 2001
From: VIGNET Pierre <pierre.vignet@irisa.fr>
Date: Thu, 12 Dec 2019 19:15:38 +0100
Subject: [PATCH] [cmd][lib] switch get_shift_direction to a proper property

---
 library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py   | 3 ++-
 library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py b/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
index cd28e41..6842ea3 100644
--- a/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
+++ b/library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
@@ -576,7 +576,8 @@ class CLUnfolder(object):
         """Get the DIMACS codes of the input variables"""
         return self.__inputs
 
-    def get_shift_direction(self):
+    @property
+    def shift_direction(self):
         """
         @return: string "FORWARD" or "BACKWARD"
         """
diff --git a/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py b/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
index 2d79218..b681a02 100644
--- a/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
+++ b/library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
@@ -135,7 +135,7 @@ class RawSolution(object):
         self.unfolder = unfolder
         self.shift_step = unfolder.shift_step
         self.current_step = unfolder.current_step
-        self.shift_direction = unfolder.get_shift_direction()
+        self.shift_direction = unfolder.shift_direction
 
     def get_unshift_code(self, var_num):
         """Get the real value of the given variable in the system (remove the shift)
-- 
GitLab