--- a/mercurial/i18n.py Wed Dec 20 20:13:22 2023 +0100
+++ b/mercurial/i18n.py Tue Dec 19 21:29:34 2023 +0100
@@ -71,8 +71,7 @@
_msgcache = {} # encoding: {message: translation}
-def gettext(message):
- # type: (bytes) -> bytes
+def gettext(message: bytes) -> bytes:
"""Translate message.
The message is looked up in the catalog to get a Unicode string,
@@ -123,6 +122,10 @@
if _plain():
- _ = lambda message: message # type: Callable[[bytes], bytes]
+
+ def _(message: bytes) -> bytes:
+ return message
+
+
else:
_ = gettext