diff --git a/dotdrop/action.py b/dotdrop/action.py index 42d964c..2d9e6f9 100644 --- a/dotdrop/action.py +++ b/dotdrop/action.py @@ -27,6 +27,9 @@ class Cmd: def __str__(self): return 'key:{} -> \"{}\"'.format(self.key, self.action) + def __repr__(self): + return 'cmd({})'.format(self.__str__()) + def __eq__(self, other): return self.__dict__ == other.__dict__ @@ -51,6 +54,9 @@ class Action(Cmd): out = '{}: \"{}\" with args: {}' return out.format(self.key, self.action, self.args) + def __repr__(self): + return 'action({})'.format(self.__str__()) + def execute(self): """execute the action in the shell""" ret = 1 diff --git a/dotdrop/dotfile.py b/dotdrop/dotfile.py index 2b3b090..178d363 100644 --- a/dotdrop/dotfile.py +++ b/dotdrop/dotfile.py @@ -41,6 +41,9 @@ class Dotfile: msg = 'key:\"{}\", src:\"{}\", dst:\"{}\", link:\"{}\"' return msg.format(self.key, self.src, self.dst, self.link.name.lower()) + def __repr__(self): + return 'dotfile({})'.format(self.__str__()) + def __eq__(self, other): return self.__dict__ == other.__dict__