encoding: make getcols() raise exception explicitly
This helps pytype.
File "mercurial/encoding.py", line 329, in getcols: bad option in return
type [bad-return-type]
Expected: bytes
Actually returned: None
--- a/mercurial/encoding.py Sat Nov 16 12:19:43 2019 -0500
+++ b/mercurial/encoding.py Sat Nov 16 15:43:21 2019 +0900
@@ -327,6 +327,7 @@
t = s[start:x]
if colwidth(t) == c:
return t
+ raise ValueError('substring not found')
def trim(s, width, ellipsis=b'', leftside=False):