from collections.abc import Iterator

from _cffi_backend import _CDataBase

from ._pygit2 import Oid, Signature

def wrap_signature(csig: _CDataBase) -> Signature: ...

class BlameHunk:
    @property
    def lines_in_hunk(self) -> int: ...
    @property
    def boundary(self) -> bool: ...
    @property
    def final_start_line_number(self) -> int: ...
    @property
    def final_committer(self) -> Signature: ...
    @property
    def final_commit_id(self) -> Oid: ...
    @property
    def orig_start_line_number(self) -> int: ...
    @property
    def orig_committer(self) -> Signature: ...
    @property
    def orig_commit_id(self) -> Oid: ...
    @property
    def orig_path(self) -> str | None: ...

class Blame:
    def __del__(self) -> None: ...
    def __len__(self) -> int: ...
    def __getitem__(self, index: int) -> BlameHunk: ...
    def for_line(self, line_no: int) -> BlameHunk: ...
    def __iter__(self) -> Iterator[BlameHunk]: ...
