Passed
Push — main ( af1065...15d22f )
by Douglas
04:30
created

pocketutils.tools.git_description   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A GitDescription.__repr__() 0 2 1
A GitDescription.__str__() 0 2 1
1
from dataclasses import dataclass
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
3
4
@dataclass(frozen=True, eq=True)
5
class GitDescription:
6
    """
7
    Data collected from running ``git describe --long --dirty --broken --abbrev=40 --tags``.
8
    """
9
10
    text: str
11
    tag: str
12
    commits: str
13
    hash: str
14
    is_dirty: bool
15
    is_broken: bool
16
17
    def __repr__(self):
18
        return self.__class__.__name__ + "(" + self.text + ")"
19
20
    def __str__(self):
21
        return repr(self)
22
23
24
__all__ = ["GitDescription"]
25