Mercurial > public > mercurial-scm > hg
diff mercurial/revlogutils/revlogv0.py @ 52643:5cc8deb96b48
pyupgrade: modernize calls to superclass methods
This is the `legacy` fixer in `pyupgrade`, with the loop yielding the offset of
`yield` statements commented out.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 05 Jan 2025 22:23:31 -0500 |
parents | 609700e5d8df |
children | 8de68446a5bd |
line wrap: on
line diff
--- a/mercurial/revlogutils/revlogv0.py Sun Jan 05 22:12:02 2025 -0500 +++ b/mercurial/revlogutils/revlogv0.py Sun Jan 05 22:23:31 2025 -0500 @@ -72,14 +72,14 @@ def append(self, tup): self._nodemap[tup[7]] = len(self) - super(revlogoldindex, self).append(tup) + super().append(tup) def __delitem__(self, i): if not isinstance(i, slice) or not i.stop == -1 or i.step is not None: raise ValueError(b"deleting slices only supports a:-1 with step 1") for r in range(i.start, len(self)): del self._nodemap[self[r][7]] - super(revlogoldindex, self).__delitem__(i) + super().__delitem__(i) def clearcaches(self): self.__dict__.pop('_nodemap', None)