D7456: scmutil: add assertions to help pytype
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Tue Nov 19 22:46:32 UTC 2019
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7456
AFFECTED FILES
mercurial/scmutil.py
CHANGE DETAILS
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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):
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list