changeset 43760:5b90a050082b

scmutil: add assertions to help pytype Differential Revision: https://phab.mercurial-scm.org/D7456
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 19 Nov 2019 14:13:04 -0500
parents 6c6d67fc45cb
children 4330851947fb
files mercurial/scmutil.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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):