# HG changeset patch # User Matt Harbison # Date 1574190784 18000 # Node ID 5b90a050082bd9e3b4f34edae4a16426bae3bef3 # Parent 6c6d67fc45cbadce3591ff5c440431f75ef9bdd8 scmutil: add assertions to help pytype Differential Revision: https://phab.mercurial-scm.org/D7456 diff -r 6c6d67fc45cb -r 5b90a050082b mercurial/scmutil.py --- a/mercurial/scmutil.py Tue Nov 19 14:04:09 2019 -0500 +++ b/mercurial/scmutil.py Tue Nov 19 14:13:04 2019 -0500 @@ -1917,6 +1917,7 @@ def wrapped(tr): repo = reporef() if filtername: + assert repo is not None # help pytype repo = repo.filtered(filtername) func(repo, tr) @@ -1936,6 +1937,7 @@ if cgheads: htext = _(b" (%+d heads)") % cgheads msg = _(b"added %d changesets with %d changes to %d files%s\n") + assert repo is not None # help pytype repo.ui.status(msg % (cgchangesets, cgrevisions, cgfiles, htext)) if txmatch(_reportobsoletedsource):