Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webcommands.py @ 46789:914ca0a98518 stable
typing: add an assertion to mercurial/hgweb/webcommands.py to help pytype
I have no idea why this is needed, given the check immediately above. But
without it, I'm getting this:
File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 1164, in filelog: Missing parameter 'toline' in call to function mercurial.dagop.blockdescendants [missing-parameter]
Expected: (fctx, fromline, toline)
Actually passed: (fctx, fromline)
File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 1166, in filelog: Missing parameter 'toline' in call to function mercurial.dagop.blockancestors [missing-parameter]
Expected: (fctx, fromline, toline, followfirst)
Actually passed: (fctx, fromline)
Differential Revision: https://phab.mercurial-scm.org/D10211
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 12 Mar 2021 20:25:12 -0500 |
parents | dc9fe90bdbd5 |
children | d4ba4d51f85f |
comparison
equal
deleted
inserted
replaced
46788:693991ccfc49 | 46789:914ca0a98518 |
---|---|
1154 lineidprefix=b'%s-' % ctx.hex()[:12], | 1154 lineidprefix=b'%s-' % ctx.hex()[:12], |
1155 ) | 1155 ) |
1156 | 1156 |
1157 linerange = None | 1157 linerange = None |
1158 if lrange is not None: | 1158 if lrange is not None: |
1159 assert lrange is not None # help pytype (!?) | |
1159 linerange = webutil.formatlinerange(*lrange) | 1160 linerange = webutil.formatlinerange(*lrange) |
1160 # deactivate numeric nav links when linerange is specified as this | 1161 # deactivate numeric nav links when linerange is specified as this |
1161 # would required a dedicated "revnav" class | 1162 # would required a dedicated "revnav" class |
1162 nav = templateutil.mappinglist([]) | 1163 nav = templateutil.mappinglist([]) |
1163 if descend: | 1164 if descend: |