revset: add an assertion to help pytype
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 19 Nov 2019 14:04:09 -0500
changeset 43759 6c6d67fc45cb
parent 43758 71dbd6f6fcb8
child 43760 5b90a050082b
revset: add an assertion to help pytype Differential Revision: https://phab.mercurial-scm.org/D7455
mercurial/revset.py
--- a/mercurial/revset.py	Thu Nov 21 09:25:50 2019 +0100
+++ b/mercurial/revset.py	Tue Nov 19 14:04:09 2019 -0500
@@ -684,6 +684,8 @@
             mcache[0] = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
         m = mcache[0]
         fname = None
+
+        assert m is not None  # help pytype
         if not m.anypats() and len(m.files()) == 1:
             fname = m.files()[0]
         if fname is not None: