diff mercurial/smartset.py @ 52668: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 e627cc25b6f3
line wrap: on
line diff
--- a/mercurial/smartset.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/mercurial/smartset.py	Sun Jan 05 22:23:31 2025 -0500
@@ -355,7 +355,7 @@
             )
             s._ascending = self._ascending
         else:
-            s = getattr(super(baseset, self), op)(other)
+            s = getattr(super(), op)(other)
         return s
 
     def __and__(self, other):
@@ -786,7 +786,7 @@
         else:
             typ = _generatorsetdesc
 
-        return super(generatorset, cls).__new__(typ)
+        return super().__new__(typ)
 
     def __init__(self, gen, iterasc=None):
         """
@@ -1093,7 +1093,7 @@
     def _slice(self, start, stop):
         if self._hiddenrevs:
             # unoptimized since all hidden revisions in range has to be scanned
-            return super(_spanset, self)._slice(start, stop)
+            return super()._slice(start, stop)
         if self._ascending:
             x = min(self._start + start, self._end)
             y = min(self._start + stop, self._end)
@@ -1116,9 +1116,7 @@
     """
 
     def __init__(self, repo):
-        super(fullreposet, self).__init__(
-            0, len(repo), True, repo.changelog.filteredrevs
-        )
+        super().__init__(0, len(repo), True, repo.changelog.filteredrevs)
 
     def __and__(self, other):
         """As self contains the whole repo, all of the other set should also be