Mercurial > public > mercurial-scm > hg
diff mercurial/bundle2.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 | 24ee91ba9aa8 |
children | e627cc25b6f3 |
line wrap: on
line diff
--- a/mercurial/bundle2.py Sun Jan 05 22:12:02 2025 -0500 +++ b/mercurial/bundle2.py Sun Jan 05 22:23:31 2025 -0500 @@ -853,7 +853,7 @@ self.ui = ui self._compengine = util.compengines.forbundletype(b'UN') self._compressed = None - super(unbundle20, self).__init__(fp) + super().__init__(fp) @util.propertycache def params(self): @@ -1269,7 +1269,7 @@ Part processed in this manner only have access to a ui object,""" def __init__(self, ui, fp): - super(interrupthandler, self).__init__(fp) + super().__init__(fp) self.ui = ui def _readpartheader(self): @@ -1390,7 +1390,7 @@ """a bundle part read from a bundle""" def __init__(self, ui, header, fp): - super(unbundlepart, self).__init__(fp) + super().__init__(fp) self._seekable = hasattr(fp, 'seek') and hasattr(fp, 'tell') self.ui = ui # unbundle state attr @@ -1526,7 +1526,7 @@ # (payload, file) offsets for chunk starts. self._chunkindex = [] - super(seekableunbundlepart, self).__init__(ui, header, fp) + super().__init__(ui, header, fp) def _payloadchunks(self, chunknum=0): '''seek to specified chunk and start yielding data'''