From 52e7ee3e6ef8d52580ac8e36e2ba2a9ab3551c74 Mon Sep 17 00:00:00 2001 From: geisserml Date: Wed, 31 Aug 2022 16:34:00 +0200 Subject: [PATCH] Improve consistency of helper class init --- src/pypdfium2/_helpers/page.py | 8 ++++---- src/pypdfium2/_helpers/textpage.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pypdfium2/_helpers/page.py b/src/pypdfium2/_helpers/page.py index 63e6686e2..eaa50116c 100644 --- a/src/pypdfium2/_helpers/page.py +++ b/src/pypdfium2/_helpers/page.py @@ -50,8 +50,8 @@ class PdfPage: * The :attr:`.pdf` attribute stores the :class:`.PdfDocument` this page belongs to. """ - def __init__(self, page, pdf): - self.raw = page + def __init__(self, raw, pdf): + self.raw = raw self.pdf = pdf def close(self): @@ -534,8 +534,8 @@ class PdfPageObject: * The :attr:`.page` attribute stores the :class:`.PdfPage` this page object belongs to. """ - def __init__(self, pageobj, page): - self.raw = pageobj + def __init__(self, raw, page): + self.raw = raw self.page = page def get_pos(self): diff --git a/src/pypdfium2/_helpers/textpage.py b/src/pypdfium2/_helpers/textpage.py index a1c2cc965..c63591264 100644 --- a/src/pypdfium2/_helpers/textpage.py +++ b/src/pypdfium2/_helpers/textpage.py @@ -16,8 +16,8 @@ class PdfTextPage: * The :attr:`.page` attribute stores the :class:`.PdfPage` this text page belongs to. """ - def __init__(self, textpage, page): - self.raw = textpage + def __init__(self, raw, page): + self.raw = raw self.page = page def close(self): @@ -214,8 +214,8 @@ class PdfTextSearcher: * The :attr:`.textpage` attribute stores the :class:`.PdfTextPage` this searcher belongs to. """ - def __init__(self, search, textpage): - self.raw = search + def __init__(self, raw, textpage): + self.raw = raw self.textpage = textpage def _get_occurrence(self, find_func):