mercurial/i18n.py
changeset 51287 f15cb5111a1e
parent 51285 9d3721552b6c
child 51288 8b2ea2246a5f
--- 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