diff mercurial/changelog.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 13815c9decd4
children
line wrap: on
line diff
--- a/mercurial/changelog.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/mercurial/changelog.py	Sun Jan 05 22:23:31 2025 -0500
@@ -136,7 +136,7 @@
         if not text:
             return _changelogrevision(extra=_defaultextra, manifest=cl.nullid)
 
-        self = super(changelogrevision, cls).__new__(cls)
+        self = super().__new__(cls)
         # We could return here and implement the following as an __init__.
         # But doing it here is equivalent and saves an extra function call.
 
@@ -352,7 +352,7 @@
 
     def _write_docket(self, tr):
         if not self._v2_delayed:
-            super(changelog, self)._write_docket(tr)
+            super()._write_docket(tr)
 
     def delayupdate(self, tr):
         """delay visibility of index updates to other readers"""