diff hgext/largefiles/lfcommands.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 f4733654f144
children
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/hgext/largefiles/lfcommands.py	Sun Jan 05 22:23:31 2025 -0500
@@ -171,12 +171,12 @@
 
             class lfsource(filemap.filemap_source):
                 def __init__(self, ui, source):
-                    super(lfsource, self).__init__(ui, source, None)
+                    super().__init__(ui, source, None)
                     self.filemapper.rename[lfutil.shortname] = b'.'
 
                 def getfile(self, name, rev):
                     realname, realrev = rev
-                    f = super(lfsource, self).getfile(name, rev)
+                    f = super().getfile(name, rev)
 
                     if (
                         not realname.startswith(lfutil.shortnameslash)
@@ -199,9 +199,7 @@
                 def __init__(self, ui, source, dest, revmapfile, opts):
                     src = lfsource(ui, source)
 
-                    super(converter, self).__init__(
-                        ui, src, dest, revmapfile, opts
-                    )
+                    super().__init__(ui, src, dest, revmapfile, opts)
 
             found, missing = downloadlfiles(ui, rsrc)
             if missing != 0: