# HG changeset patch # User Matt Harbison # Date 1667935870 18000 # Node ID b6fc602e074a813e8e27cf5784241b7ab39f1f32 # Parent 94a797032fc471c807bfd2a327b80157476dfc07 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. diff -r 94a797032fc4 -r b6fc602e074a mercurial/cext/osutil.pyi --- 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: ...