Mercurial > hg-stable
changeset 46417: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 | 693991ccfc49 |
children | 5137896602d9 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Fri Mar 12 19:02:07 2021 -0500 +++ b/mercurial/hgweb/webcommands.py Fri Mar 12 20:25:12 2021 -0500 @@ -1156,6 +1156,7 @@ linerange = None if lrange is not None: + assert lrange is not None # help pytype (!?) linerange = webutil.formatlinerange(*lrange) # deactivate numeric nav links when linerange is specified as this # would required a dedicated "revnav" class