# HG changeset patch # User Matt Harbison # Date 2021-03-13 01:25:12 # Node ID 914ca0a9851833043f2820d8a85c6a38742087ec # Parent 693991ccfc497aa837c2086c97367d109fa7f402 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 diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -1156,6 +1156,7 @@ def filelog(web): 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