some syntactic fixes

This commit is contained in:
Ozbolt Menegatti 2019-11-16 14:18:52 +01:00
parent e287e2414a
commit 5301b2a5fa
2 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,7 @@ class Message:
class ClickMessage(Message): class ClickMessage(Message):
def __init__(self, event): def __init__(self, event):
event.stopPropagation(); event.stopPropagation()
def msg(message_class, params): def msg(message_class, params):

View File

@ -1,5 +1,6 @@
class Editable: class Editable:
def make_copy(self): def make_copy(self):
# makes an internal copy of self
# delete old copy # delete old copy
if hasattr(self, "_copy"): if hasattr(self, "_copy"):
if self._copy is not None: if self._copy is not None:
@ -9,6 +10,7 @@ class Editable:
self._copy = JSON.parse(JSON.stringify(self)) self._copy = JSON.parse(JSON.stringify(self))
def copy(self): def copy(self):
# return internal copy of self
# check if even initialized # check if even initialized
if hasattr(self, "_copy"): if hasattr(self, "_copy"):
return self._copy return self._copy