# HG changeset patch # User Matt Harbison # Date 2022-07-13 15:30:13 # Node ID 093e5c274f54a736d6daf88b678c241c1227fbc9 # Parent de2e158c380a764b469b3e0360ed27311fb2f1e0 typing: suppress a few pyi-errors with more recent pytype Not sure what's going on here, but these were flagged with pytype 2022.03.21. We can't update to something much more recent, because newer versions complain about various `attr` uses. diff --git a/mercurial/hgweb/__init__.py b/mercurial/hgweb/__init__.py --- a/mercurial/hgweb/__init__.py +++ b/mercurial/hgweb/__init__.py @@ -18,12 +18,15 @@ from .. import ( from ..utils import procutil +# pytype: disable=pyi-error from . import ( hgweb_mod, hgwebdir_mod, server, ) +# pytype: enable=pyi-error + def hgweb(config, name=None, baseui=None): """create an hgweb wsgi object diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -1150,7 +1150,7 @@ class svnsubrepo(abstractsubrepo): # commit revision so we can compare the subrepo state with # both. We used to store the working directory one. output, err = self._svncommand([b'info', b'--xml']) - doc = xml.dom.minidom.parseString(output) + doc = xml.dom.minidom.parseString(output) # pytype: disable=pyi-error entries = doc.getElementsByTagName('entry') lastrev, rev = b'0', b'0' if entries: @@ -1174,7 +1174,7 @@ class svnsubrepo(abstractsubrepo): """ output, err = self._svncommand([b'status', b'--xml']) externals, changes, missing = [], [], [] - doc = xml.dom.minidom.parseString(output) + doc = xml.dom.minidom.parseString(output) # pytype: disable=pyi-error for e in doc.getElementsByTagName('entry'): s = e.getElementsByTagName('wc-status') if not s: @@ -1319,7 +1319,7 @@ class svnsubrepo(abstractsubrepo): @annotatesubrepoerror def files(self): output = self._svncommand([b'list', b'--recursive', b'--xml'])[0] - doc = xml.dom.minidom.parseString(output) + doc = xml.dom.minidom.parseString(output) # pytype: disable=pyi-error paths = [] for e in doc.getElementsByTagName('entry'): kind = pycompat.bytestr(e.getAttribute('kind'))