Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from dataclasses import dataclass |
||
2 | from typing import List |
||
3 | |||
4 | |||
5 | @dataclass |
||
6 | class Group: |
||
7 | """A group with sources.""" |
||
8 | |||
9 | name: str |
||
10 | members: List[str] |
||
11 | |||
12 | def __repr__(self): |
||
13 | return "<group {}>".format(self) |
||
14 | |||
15 | def __str__(self): |
||
16 | pattern = "['{n}']" |
||
17 | return pattern.format(n=self.name) |
||
18 | |||
19 | def __eq__(self, other): |
||
20 | return self.name == other.name |
||
21 | |||
22 | def __ne__(self, other): |
||
23 | return self.name != other.name |
||
24 | |||
25 | def __lt__(self, other): |
||
26 | return self.name < other.name |
||
27 |