Show More
@@ -7,6 +7,8 | |||
|
7 | 7 | |
|
8 | 8 | from __future__ import annotations |
|
9 | 9 | |
|
10 | import abc | |
|
11 | ||
|
10 | 12 | from typing import ( |
|
11 | 13 | Iterator, |
|
12 | 14 | Protocol, |
@@ -42,8 +44,10 class Status(Protocol): | |||
|
42 | 44 | clean: list[bytes] |
|
43 | 45 | """The list of files that are not in any other state.""" |
|
44 | 46 | |
|
47 | @abc.abstractmethod | |
|
45 | 48 | def __iter__(self) -> Iterator[list[bytes]]: |
|
46 | 49 | """Iterates over each of the categories of file lists.""" |
|
47 | 50 | |
|
51 | @abc.abstractmethod | |
|
48 | 52 | def __repr__(self) -> str: |
|
49 | 53 | """Creates a string representation of the file lists.""" |
@@ -64,6 +64,8 from . import ( | |||
|
64 | 64 | vfs, |
|
65 | 65 | ) |
|
66 | 66 | |
|
67 | from .interfaces import status as istatus | |
|
68 | ||
|
67 | 69 | from .utils import ( |
|
68 | 70 | hashutil, |
|
69 | 71 | procutil, |
@@ -87,7 +89,7 termsize = scmplatform.termsize | |||
|
87 | 89 | |
|
88 | 90 | |
|
89 | 91 | @attr.s(slots=True, repr=False) |
|
90 | class status: | |
|
92 | class status(istatus.Status): | |
|
91 | 93 | """Struct with a list of files per status. |
|
92 | 94 | |
|
93 | 95 | The 'deleted', 'unknown' and 'ignored' properties are only |
General Comments 0
You need to be logged in to leave comments.
Login now