typing: fix type annotation stable
authorManuel Jacob <me@manueljacob.de>
Tue, 06 Aug 2024 18:23:59 +0200
branchstable
changeset 51793 0f62ea8a9be8
parent 51792 472699b5ddb3
child 51794 bd490cdf764a
typing: fix type annotation
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: