Completed
Push — develop ( 51e53a...40e7fd )
by Jace
15s queued 11s
created

gitman.models.group.Group.__eq__()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 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