( )⚙ D10211 typing: add an assertion to mercurial/hgweb/webcommands.py to help pytype

This is an archive of the discontinued Mercurial Phabricator instance.

typing: add an assertion to mercurial/hgweb/webcommands.py to help pytype
ClosedPublic

Authored by mharbison72 on Mar 13 2021, 2:33 PM.

Details

Summary

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)

Diff Detail

Repository
rHG Mercurial
Branch
stable
Lint
No Linters Available
Unit
No Unit Test Coverage