diff -r b2666e767029 -r 594fc56c0af7 mercurial/cffi/bdiff.py --- a/mercurial/cffi/bdiff.py Tue Nov 08 13:52:46 2022 -0500 +++ b/mercurial/cffi/bdiff.py Tue Nov 08 13:59:16 2022 -0500 @@ -8,6 +8,11 @@ import struct +from typing import ( + List, + Tuple, +) + from ..pure.bdiff import * from . import _bdiff # pytype: disable=import-error @@ -15,7 +20,7 @@ lib = _bdiff.lib -def blocks(sa, sb): +def blocks(sa: bytes, sb: bytes) -> List[Tuple[int, int, int, int]]: a = ffi.new(b"struct bdiff_line**") b = ffi.new(b"struct bdiff_line**") ac = ffi.new(b"char[]", str(sa)) @@ -43,7 +48,7 @@ return rl -def bdiff(sa, sb): +def bdiff(sa: bytes, sb: bytes) -> bytes: a = ffi.new(b"struct bdiff_line**") b = ffi.new(b"struct bdiff_line**") ac = ffi.new(b"char[]", str(sa))