Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from dataclasses import dataclass |
||
|
|||
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 |