mercurial/utils/stringutil.py
changeset 49648 9be765b82a90
parent 49575 bbbb5213d043
child 51686 493034cc3265
--- a/mercurial/utils/stringutil.py	Sun Nov 20 22:54:43 2022 -0500
+++ b/mercurial/utils/stringutil.py	Wed Nov 23 11:22:22 2022 -0500
@@ -723,11 +723,15 @@
         s = bytes(s)
     # call underlying function of s.encode('string_escape') directly for
     # Python 3 compatibility
+    # pytype: disable=bad-return-type
     return codecs.escape_encode(s)[0]  # pytype: disable=module-attr
+    # pytype: enable=bad-return-type
 
 
 def unescapestr(s: bytes) -> bytes:
+    # pytype: disable=bad-return-type
     return codecs.escape_decode(s)[0]  # pytype: disable=module-attr
+    # pytype: enable=bad-return-type
 
 
 def forcebytestr(obj):