##// END OF EJS Templates
typing: suppress a couple of attribute-errors in convert...
Matt Harbison -
r50761:2ac60a71 default
parent child Browse files
Show More
@@ -608,7 +608,10 b' class mercurial_source(common.converter_'
608 files = copyfiles = ctx.manifest()
608 files = copyfiles = ctx.manifest()
609 if parents:
609 if parents:
610 if self._changescache[0] == rev:
610 if self._changescache[0] == rev:
611 ma, r = self._changescache[1]
611 # TODO: add type hints to avoid this warning, instead of
612 # suppressing it:
613 # No attribute '__iter__' on None [attribute-error]
614 ma, r = self._changescache[1] # pytype: disable=attribute-error
612 else:
615 else:
613 ma, r = self._changedfiles(parents[0], ctx)
616 ma, r = self._changedfiles(parents[0], ctx)
614 if not full:
617 if not full:
@@ -725,7 +725,13 b' class svn_source(converter_source):'
725 def getchanges(self, rev, full):
725 def getchanges(self, rev, full):
726 # reuse cache from getchangedfiles
726 # reuse cache from getchangedfiles
727 if self._changescache[0] == rev and not full:
727 if self._changescache[0] == rev and not full:
728 # TODO: add type hints to avoid this warning, instead of
729 # suppressing it:
730 # No attribute '__iter__' on None [attribute-error]
731
732 # pytype: disable=attribute-error
728 (files, copies) = self._changescache[1]
733 (files, copies) = self._changescache[1]
734 # pytype: enable=attribute-error
729 else:
735 else:
730 (files, copies) = self._getchanges(rev, full)
736 (files, copies) = self._getchanges(rev, full)
731 # caller caches the result, so free it here to release memory
737 # caller caches the result, so free it here to release memory
General Comments 0
You need to be logged in to leave comments. Login now