|
1 | 1 | import logging
|
2 |
| -from enum import Enum |
3 | 2 |
|
4 | 3 | logger = logging.getLogger(__name__)
|
5 | 4 |
|
@@ -31,6 +30,31 @@ def __eq__(self, other):
|
31 | 30 | return self.code == other.code
|
32 | 31 | return self.code == other
|
33 | 32 |
|
| 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 | + |
34 | 58 | def __hash__(self):
|
35 | 59 | return self.code.__hash__()
|
36 | 60 |
|
|
0 commit comments