typing: fix the typehint for `skip` arg on `osutil.listdir()` to be optional
The cffi and pure implementations both default to `None`, and the args are
parsed in C with `"y#|OO:listdir"`, with the C variable initialized to NULL.
--- a/mercurial/cext/osutil.pyi Tue Nov 08 14:17:56 2022 -0500
+++ b/mercurial/cext/osutil.pyi Tue Nov 08 14:31:10 2022 -0500
@@ -2,6 +2,7 @@
AnyStr,
IO,
List,
+ Optional,
Sequence,
)
@@ -15,7 +16,7 @@
st_mtime: int
st_ctime: int
-def listdir(path: bytes, st: bool, skip: bool) -> List[stat]: ...
+def listdir(path: bytes, st: bool, skip: Optional[bool]) -> List[stat]: ...
def posixfile(name: AnyStr, mode: bytes, buffering: int) -> IO: ...
def statfiles(names: Sequence[bytes]) -> List[stat]: ...
def setprocname(name: bytes) -> None: ...