# HG changeset patch # User Matt Harbison # Date 2021-03-12 23:55:06 # Node ID c6d9948e865f550306154dad7c4e9b235fe43dd3 # Parent 279edaaea711fc810ad0dcaf22e17b43e6c144fc crecord: convert an instance of bytes to str Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/crecord.py", line 1154, in printstring: Function _CursesWindow.addstr was called with the wrong arguments [wrong-arg-types] Expected: (self, str: str, ...) Actually passed: (self, str: bytes, ...) Differential Revision: https://phab.mercurial-scm.org/D10203 diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -1152,7 +1152,7 @@ class curseschunkselector(object): numtrailingspaces = origlen - strippedlen if towin: - window.addstr(text, colorpair) + window.addstr(encoding.strfromlocal(text), colorpair) t += text if showwhtspc: