diff contrib/testparseutil.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 cd3b8fd1d3eb
children 3e84e001b6c1
line wrap: on
line diff
--- a/contrib/testparseutil.py	Sun Jan 05 22:12:02 2025 -0500
+++ b/contrib/testparseutil.py	Sun Jan 05 22:23:31 2025 -0500
@@ -304,7 +304,7 @@
     _prefix = '  > '
 
     def __init__(self, desc, namepat):
-        super(fileheredocmatcher, self).__init__(desc)
+        super().__init__(desc)
 
         # build the pattern to match against cases below (and ">>"
         # variants), and to return a target filename string as 'name'
@@ -426,7 +426,7 @@
     _outputre = re.compile(r' {2}$| {2}[^$]')
 
     def __init__(self):
-        super(pydoctestmatcher, self).__init__("doctest style python code")
+        super().__init__("doctest style python code")
 
     def startsat(self, line):
         # ctx is "True"
@@ -500,7 +500,7 @@
     )
 
     def __init__(self):
-        super(pyheredocmatcher, self).__init__("heredoc python invocation")
+        super().__init__("heredoc python invocation")
 
     def startsat(self, line):
         # ctx is END-LINE-OF-EMBEDDED-CODE