# HG changeset patch # User Yuya Nishihara # Date 2019-11-16 06:43:21 # Node ID 7cf332318f62f0e79c45a1c1e5cf0a0276bd00bb # Parent 52e4bfebc4ba0ae7a050aea277cb3c72c3cd0cad 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 diff --git a/mercurial/encoding.py b/mercurial/encoding.py --- a/mercurial/encoding.py +++ b/mercurial/encoding.py @@ -327,6 +327,7 @@ def getcols(s, start, c): t = s[start:x] if colwidth(t) == c: return t + raise ValueError('substring not found') def trim(s, width, ellipsis=b'', leftside=False):