Conditions | 5 |
Total Lines | 8 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5.0488 |
Changes | 0 |
1 | 1 | import logging |
|
29 | 1 | def __eq__(self, other): |
|
30 | 1 | if isinstance(other, Code): |
|
31 | 1 | return self.code == other.code |
|
32 | 1 | if isinstance(other, str) or isinstance(other, int): |
|
33 | 1 | return self.code == other |
|
34 | 1 | if isinstance(other, Enum): |
|
35 | 1 | return self.code == other.value |
|
36 | return NotImplemented |
||
37 | |||
42 |