comparison mercurial/changegroup.py @ 48473:8843c9a8771b

pytype: stop excluding changegroup.py The false positives that were detected seem to be related to what happens to the variables after the local methods are used: File "/mnt/c/Users/Matt/hg/mercurial/changegroup.py", line 353, in ondupchangelog: No attribute 'append' on range [attribute-error] In Union[List[nothing], range] File "/mnt/c/Users/Matt/hg/mercurial/changegroup.py", line 357, in onchangelog: No attribute 'update' on None [attribute-error] Differential Revision: https://phab.mercurial-scm.org/D11912
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 12 Dec 2021 21:10:02 -0500
parents 3f00665bbea0
children 6000f5b25c9b
comparison
equal deleted inserted replaced
48472:a4d8de93023c 48473:8843c9a8771b
348 efilesset = set() 348 efilesset = set()
349 duprevs = [] 349 duprevs = []
350 350
351 def ondupchangelog(cl, rev): 351 def ondupchangelog(cl, rev):
352 if rev < clstart: 352 if rev < clstart:
353 duprevs.append(rev) 353 duprevs.append(rev) # pytype: disable=attribute-error
354 354
355 def onchangelog(cl, rev): 355 def onchangelog(cl, rev):
356 ctx = cl.changelogrevision(rev) 356 ctx = cl.changelogrevision(rev)
357 assert efilesset is not None # help pytype
357 efilesset.update(ctx.files) 358 efilesset.update(ctx.files)
358 repo.register_changeset(rev, ctx) 359 repo.register_changeset(rev, ctx)
359 360
360 self.changelogheader() 361 self.changelogheader()
361 deltas = self.deltaiter() 362 deltas = self.deltaiter()