Skip to content

Commit

Permalink
Fixed Improper Method Call: Replaced NotImplementedError (#2071)
Browse files Browse the repository at this point in the history
  • Loading branch information
fazledyn-or authored Nov 21, 2023
1 parent df3056c commit 67e3be5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mapcss/mapcss_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,47 +59,47 @@ def __rsub__(self, o):
elif o.__class__ == int:
return str_value(o - self.to_n())
else:
raise NotImplementedError
return NotImplemented

def __sub__(self, o):
if self.none:
return None_value
elif o.__class__ == int:
return str_value(self.to_n() - o)
else:
raise NotImplementedError
return NotImplemented

def __rmul__(self, o):
if self.none:
return None_value
elif o.__class__ == int:
return str_value(o * self.to_n())
else:
raise NotImplementedError
return NotImplemented

def __mul__(self, o):
if self.none:
return None_value
elif o.__class__ == int:
return str_value(self.to_n() * o)
else:
raise NotImplementedError
return NotImplemented

def __rdiv__(self, o):
def __rtruediv__(self, o):
if self.none:
return None_value
elif o.__class__ == int:
return str_value(float(o) / self.to_n())
else:
raise NotImplementedError
return NotImplemented

def __truediv__(self, o):
if self.none:
return None_value
elif o.__class__ == int:
return str_value(float(self.to_n()) / o)
else:
raise NotImplementedError
return NotImplemented

def __lt__(self, o):
if self.none:
Expand Down

0 comments on commit 67e3be5

Please sign in to comment.