Skip to content

Commit 180153d

Browse files
omit66tst
andauthored
BUG: Adjust 'super' calls for Python 2 (py-pdf#1335)
Co-authored-by: tst <timo.stueber@contact-software.com>
1 parent c56fd23 commit 180153d

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

PyPDF2/_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,4 +1868,4 @@ def __init__(self, *args, **kwargs):
18681868
)
18691869
if "strict" not in kwargs and len(args) < 2:
18701870
kwargs["strict"] = True # maintain the default
1871-
super().__init__(*args, **kwargs)
1871+
super(PdfFileReader, self).__init__(*args, **kwargs)

PyPDF2/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def __init__(self, lengthFunction, getFunction):
206206
stacklevel=2,
207207
)
208208
warnings.warn(DEPR_MSG_NO_REPLACEMENT.format("ConvertFunctionsToVirtualList"))
209-
super().__init__(lengthFunction, getFunction)
209+
super(ConvertFunctionsToVirtualList, self).__init__(lengthFunction, getFunction)
210210

211211

212212
def matrix_multiply(a, b):

PyPDF2/_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1774,4 +1774,4 @@ def __init__(self, *args, **kwargs):
17741774
PendingDeprecationWarning,
17751775
stacklevel=2,
17761776
)
1777-
super().__init__(*args, **kwargs)
1777+
super(PdfFileWriter, self).__init__(*args, **kwargs)

PyPDF2/merger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,4 +766,4 @@ def __init__(self, *args, **kwargs):
766766
)
767767
if "strict" not in kwargs and len(args) < 1:
768768
kwargs["strict"] = True # maintain the default
769-
super().__init__(*args, **kwargs)
769+
super(PdfFileMerger, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)