mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-22 07:43:06 +00:00
hashindex: cleanup .pyi
This commit is contained in:
parent
bacb923571
commit
5996b45b1d
2 changed files with 8 additions and 42 deletions
|
@ -4,68 +4,34 @@ API_VERSION: str
|
|||
|
||||
PATH_OR_FILE = Union[str, IO]
|
||||
|
||||
def hashindex_variant(fn: str) -> str: ...
|
||||
|
||||
class IndexBase:
|
||||
value_size: int
|
||||
MAX_VALUE: int
|
||||
MAX_LOAD_FACTOR: int
|
||||
def __init__(
|
||||
self, capacity: int = ..., path: PATH_OR_FILE = ..., permit_compact: bool = ..., usable: Union[int, float] = ...
|
||||
): ...
|
||||
@classmethod
|
||||
def read(cls, path: PATH_OR_FILE, permit_compact: bool = False): ...
|
||||
def write(self, path: PATH_OR_FILE) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def setdefault(self, key: bytes, value: bytes) -> None: ...
|
||||
def __delitem__(self, key: bytes) -> None: ...
|
||||
def get(self, key: bytes, default: Any = ...) -> Any: ...
|
||||
def pop(self, key: bytes, default: Any = ...) -> Any: ...
|
||||
def __len__(self) -> int: ...
|
||||
def size(self) -> int: ...
|
||||
def compact(self) -> Any: ...
|
||||
|
||||
class ChunkIndexEntry(NamedTuple):
|
||||
refcount: int
|
||||
size: int
|
||||
|
||||
CIE = Union[Tuple[int, int], Type[ChunkIndexEntry]]
|
||||
|
||||
class ChunkKeyIterator:
|
||||
def __init__(self, keysize: int) -> None: ...
|
||||
def __iter__(self) -> Iterator: ...
|
||||
def __next__(self) -> Tuple[bytes, Type[ChunkIndexEntry]]: ...
|
||||
|
||||
class ChunkIndex(IndexBase):
|
||||
class ChunkIndex:
|
||||
def add(self, key: bytes, refs: int, size: int) -> None: ...
|
||||
def iteritems(self, marker: bytes = ...) -> Iterator: ...
|
||||
def __contains__(self, key: bytes) -> bool: ...
|
||||
def __getitem__(self, key: bytes) -> Type[ChunkIndexEntry]: ...
|
||||
def __setitem__(self, key: bytes, value: CIE) -> None: ...
|
||||
|
||||
class NSIndexEntry(NamedTuple):
|
||||
class NSIndex1Entry(NamedTuple):
|
||||
segment: int
|
||||
offset: int
|
||||
size: int
|
||||
|
||||
class NSKeyIterator:
|
||||
def __init__(self, keysize: int) -> None: ...
|
||||
def __iter__(self) -> Iterator: ...
|
||||
def __next__(self) -> Tuple[bytes, Type[Any]]: ...
|
||||
|
||||
class NSIndex(IndexBase):
|
||||
class NSIndex1: # legacy
|
||||
def iteritems(self, *args, **kwargs) -> Iterator: ...
|
||||
def __contains__(self, key: bytes) -> bool: ...
|
||||
def __getitem__(self, key: bytes) -> Any: ...
|
||||
def __setitem__(self, key: bytes, value: Any) -> None: ...
|
||||
|
||||
class NSIndex1(IndexBase): # legacy
|
||||
def iteritems(self, *args, **kwargs) -> Iterator: ...
|
||||
def __contains__(self, key: bytes) -> bool: ...
|
||||
def __getitem__(self, key: bytes) -> Any: ...
|
||||
def __setitem__(self, key: bytes, value: Any) -> None: ...
|
||||
class FuseVersionsIndexEntry(NamedTuple):
|
||||
version: int
|
||||
hash: bytes
|
||||
|
||||
class FuseVersionsIndex(IndexBase):
|
||||
class FuseVersionsIndex:
|
||||
def __contains__(self, key: bytes) -> bool: ...
|
||||
def __getitem__(self, key: bytes) -> Any: ...
|
||||
def __setitem__(self, key: bytes, value: Any) -> None: ...
|
||||
|
|
|
@ -74,7 +74,7 @@ class ChunkIndex:
|
|||
return self.ht.size()
|
||||
|
||||
|
||||
FuseVersionsIndexEntry = namedtuple('FuseVersionsEntry', 'version hash')
|
||||
FuseVersionsIndexEntry = namedtuple('FuseVersionsIndexEntry', 'version hash')
|
||||
|
||||
|
||||
class FuseVersionsIndex:
|
||||
|
|
Loading…
Reference in a new issue