diff -r 472699b5ddb3 -r 0f62ea8a9be8 mercurial/posix.py --- a/mercurial/posix.py Tue Aug 06 17:53:59 2024 +0200 +++ b/mercurial/posix.py Tue Aug 06 18:23:59 2024 +0200 @@ -23,6 +23,7 @@ from typing import ( Any, AnyStr, + Callable, Iterable, Iterator, List, @@ -552,7 +553,7 @@ return False -_needsshellquote: Optional[Match[bytes]] = None +_needsshellquote: Optional[Callable[[bytes], Optional[Match[bytes]]]] = None def shellquote(s: bytes) -> bytes: