# HG changeset patch # User Matt Harbison # Date 2023-01-06 15:56:53 # Node ID 2ac60a71c240ed534cfc37435872f98c5084e2e0 # Parent 5392bf258049dbd3961bf25211da43f2101df91e typing: suppress a couple of attribute-errors in convert I thought these might be real issues, but they're not. diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -608,7 +608,10 @@ class mercurial_source(common.converter_ files = copyfiles = ctx.manifest() if parents: if self._changescache[0] == rev: - ma, r = self._changescache[1] + # TODO: add type hints to avoid this warning, instead of + # suppressing it: + # No attribute '__iter__' on None [attribute-error] + ma, r = self._changescache[1] # pytype: disable=attribute-error else: ma, r = self._changedfiles(parents[0], ctx) if not full: diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -725,7 +725,13 @@ class svn_source(converter_source): def getchanges(self, rev, full): # reuse cache from getchangedfiles if self._changescache[0] == rev and not full: + # TODO: add type hints to avoid this warning, instead of + # suppressing it: + # No attribute '__iter__' on None [attribute-error] + + # pytype: disable=attribute-error (files, copies) = self._changescache[1] + # pytype: enable=attribute-error else: (files, copies) = self._getchanges(rev, full) # caller caches the result, so free it here to release memory