From 644343f6ec69a1ab7e4c7e4a032c63c14454ef7f Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Mon, 4 May 2020 11:55:01 +0000 Subject: [PATCH] get_modeDone -> is_moving --- slic/core/adjustable/baseadjustable.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/slic/core/adjustable/baseadjustable.py b/slic/core/adjustable/baseadjustable.py index 556a113d..f3c53aaa 100644 --- a/slic/core/adjustable/baseadjustable.py +++ b/slic/core/adjustable/baseadjustable.py @@ -5,18 +5,17 @@ class BaseAdjustable(ABC): @abstractmethod def get_current_value(self): - pass + raise NotImplementedError @abstractmethod def set_target_value(self, value): - pass + raise NotImplementedError - # underscore + camelCase ? - # returning 0 or 1 ? not bool? - # moving(self) -> bool ? @abstractmethod - def get_moveDone(self): - pass + def is_moving(self): + raise NotImplementedError + + @@ -32,14 +31,14 @@ if __name__ == "__main__": def set_target_value(self, value): self.value = value - def get_moveDone(self): - return (self.value is not None) + def is_moving(self): + return (self.value is None) a = WorkingAdj() - print(a.get_moveDone(), a.get_current_value()) + print(a.is_moving(), a.get_current_value()) a.set_target_value(10) - print(a.get_moveDone(), a.get_current_value()) + print(a.is_moving(), a.get_current_value())