diff tests/testlib/persistent-nodemap-race-ext.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 805d4a462abb
children
line wrap: on
line diff
--- a/tests/testlib/persistent-nodemap-race-ext.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/tests/testlib/persistent-nodemap-race-ext.py	Sun Jan 05 22:23:31 2025 -0500
@@ -219,7 +219,7 @@
                 print_nodemap_details(cl)
                 testing.wait_file(FILE_LEFT_CL_NODEMAP_WRITE)
                 print('nodemap-race: right side ready to wait for the lock')
-            ret = super(RacedRepo, self).lock(wait=wait)
+            ret = super().lock(wait=wait)
             if newlock and _role(self) == LEFT:
                 print('nodemap-race: left side locked and ready to commit')
                 testing.write_file(FILE_LEFT_LOCKED)
@@ -234,7 +234,7 @@
 
         def transaction(self, *args, **kwargs):
             # duck punch the role on the transaction to help other pieces of code
-            tr = super(RacedRepo, self).transaction(*args, **kwargs)
+            tr = super().transaction(*args, **kwargs)
             tr._race_role = _role(self)
             return tr
 
@@ -261,7 +261,7 @@
                 print('reader ready to read the changelog, waiting for right')
                 testing.write_file(FILE_READER_READY)
                 testing.wait_file(FILE_RIGHT_CL_NODEMAP_PRE_WRITE)
-                return super(ReaderRepo, self).changelog
+                return super().changelog
 
         repo.__class__ = ReaderRepo