Skip to content

Commit c986b17

Browse files
committed
fixed issue with invalid code 0
1 parent 0bb50b4 commit c986b17

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

satcfdi/models/code.py

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import logging
2-
from enum import Enum
32

43
logger = logging.getLogger(__name__)
54

@@ -31,6 +30,31 @@ def __eq__(self, other):
3130
return self.code == other.code
3231
return self.code == other
3332

33+
def __ne__(self, other):
34+
if isinstance(other, Code):
35+
return self.code != other.code
36+
return self.code != other
37+
38+
def __lt__(self, other):
39+
if isinstance(other, Code):
40+
return self.code < other.code
41+
return self.code < other
42+
43+
def __le__(self, other):
44+
if isinstance(other, Code):
45+
return self.code <= other.code
46+
return self.code <= other
47+
48+
def __gt__(self, other):
49+
if isinstance(other, Code):
50+
return self.code > other.code
51+
return self.code > other
52+
53+
def __ge__(self, other):
54+
if isinstance(other, Code):
55+
return self.code >= other.code
56+
return self.code >= other
57+
3458
def __hash__(self):
3559
return self.code.__hash__()
3660

0 commit comments

Comments
 (0)