Mercurial > public > mercurial-scm > hg
comparison mercurial/crecord.py @ 46701:c6d9948e865f stable
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
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 12 Mar 2021 18:55:06 -0500 |
parents | 279edaaea711 |
children | 693991ccfc49 |
comparison
equal
deleted
inserted
replaced
46700:279edaaea711 | 46701:c6d9948e865f |
---|---|
1150 text = text.rstrip(b' \n') # tabs have already been expanded | 1150 text = text.rstrip(b' \n') # tabs have already been expanded |
1151 strippedlen = len(text) | 1151 strippedlen = len(text) |
1152 numtrailingspaces = origlen - strippedlen | 1152 numtrailingspaces = origlen - strippedlen |
1153 | 1153 |
1154 if towin: | 1154 if towin: |
1155 window.addstr(text, colorpair) | 1155 window.addstr(encoding.strfromlocal(text), colorpair) |
1156 t += text | 1156 t += text |
1157 | 1157 |
1158 if showwhtspc: | 1158 if showwhtspc: |
1159 wscolorpair = colorpair | curses.A_REVERSE | 1159 wscolorpair = colorpair | curses.A_REVERSE |
1160 if towin: | 1160 if towin: |