changeset 49649:df5d3b0d6472

typing: add missing signature for mercurial.cext.parsers.parse_index2() Flagged by pytype 2022.11.18 when the cext stubs are made visible to it. There are very likely other signatures that are missing, but this is enough to keep it happy for now.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 23 Nov 2022 15:50:20 -0500
parents 9be765b82a90
children 2e34ea45aaea
files mercurial/cext/parsers.pyi
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/parsers.pyi	Wed Nov 23 11:22:22 2022 -0500
+++ b/mercurial/cext/parsers.pyi	Wed Nov 23 15:50:20 2022 -0500
@@ -76,3 +76,7 @@
 
     def insert(self, rev: int) -> None: ...
     def shortest(self, node: bytes) -> int: ...
+
+# The IndexObject type here is defined in C, and there's no type for a buffer
+# return, as of py3.11.  https://github.com/python/typing/issues/593
+def parse_index2(data: object, inline: object, format: int = ...) -> Tuple[object, Optional[Tuple[int, object]]]: ...