| Total Complexity | 4 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Shared base classes and mixins.""" |
||
| 4 | 1 | class NameMixin: |
|
| 5 | """Mixin class for objects identified by their name.""" |
||
| 6 | |||
| 7 | 1 | def __str__(self): |
|
| 8 | 1 | return str(self.name) |
|
| 9 | |||
| 10 | 1 | def __eq__(self, other): |
|
| 11 | 1 | return str(self).lower() == str(other).lower() |
|
| 12 | |||
| 13 | 1 | def __ne__(self, other): |
|
| 14 | 1 | return not self.__eq__(other) |
|
| 15 | |||
| 16 | 1 | def __lt__(self, other): |
|
| 17 | return str(self).lower() < str(other).lower() |
||
| 18 |