mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
Type signature for Patcher
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
from typing import Union
|
||||
from typing import Callable, Union
|
||||
|
||||
Buffer = Union[bytes, bytearray, memoryview]
|
||||
ReadOnlyBuffer = Union[bytes, bytearray, memoryview]
|
||||
WriteBuffer = Union[bytearray, memoryview]
|
||||
|
||||
class RsyncError(Exception):
|
||||
pass
|
||||
|
||||
class Hasher:
|
||||
def __init__(self, which: str, data: Buffer = b''): ...
|
||||
def update(self, data: Buffer) -> None: ...
|
||||
def __init__(self, which: str, data: ReadOnlyBuffer = b''): ...
|
||||
def update(self, data: ReadOnlyBuffer) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def digest(self) -> bytes: ...
|
||||
def hexdigest(self) -> str: ...
|
||||
@@ -18,3 +19,11 @@ class Hasher:
|
||||
def block_size(self) -> int: ...
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
|
||||
|
||||
class Patcher:
|
||||
|
||||
def __init__(self, expected_input_size: int = 0): ...
|
||||
def signature_header(self, output: WriteBuffer) -> None: ...
|
||||
def sign_block(self, block: ReadOnlyBuffer, output: WriteBuffer) -> None: ...
|
||||
def apply_delta_data(self, data: ReadOnlyBuffer, read: Callable[[int, WriteBuffer], int], write: Callable[[ReadOnlyBuffer], None]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user