Skip to content

Commit

Permalink
#3 implementiranje change klase
Browse files Browse the repository at this point in the history
  • Loading branch information
lenkajj committed Mar 28, 2024
1 parent 7b38811 commit 7631daa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions change.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ def __init__(self, content):
def validate_content(self):
raise NotImplementedError("")

class add(Change):
class Add(Change):
def __init__(self, content):
super().__init__(content) #ovo ne treba jer nasledjuje i ne menja nista
def validate_content(self):
if not isinstance(self.content, str):
raise ValueError("mora da bude string") #ne mogu ti karakteri?

class delete(Change):
class Delete(Change):
def __init__(self):
super().__init__( None)
super().__init__(None)
def validate_content(self):
if self.content is not None:
raise ValueError("kontent mora da bude None")
raise ValueError("kontent ne sme da bude None")

class modifikacija(Change):
class Modifikacija(Change):
def __init__(self, content):
super().__init__(content)
def validate_content(self):
Expand Down

0 comments on commit 7631daa

Please sign in to comment.