diff hgext/lfs/blobstore.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
line wrap: on
line diff
--- a/hgext/lfs/blobstore.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/hgext/lfs/blobstore.py	Sun Jan 05 22:23:31 2025 -0500
@@ -49,7 +49,7 @@
         """split the path at first two characters, like: XX/XXXXX..."""
         if not _lfsre.match(path):
             raise error.ProgrammingError(b'unexpected lfs path: %s' % path)
-        return super(lfsvfs, self).join(path[0:2], path[2:], *insidef)
+        return super().join(path[0:2], path[2:], *insidef)
 
     def walk(self, path=None, onerror=None):
         """Yield (dirpath, [], oids) tuple for blobs under path
@@ -104,7 +104,7 @@
     """a file-like object that supports keepalive."""
 
     def __init__(self, ui, filename):
-        super(lfsuploadfile, self).__init__(ui, filename, b'rb')
+        super().__init__(ui, filename, b'rb')
         self.read = self._data.read
 
     def _makeprogress(self):