Skip to content

Commit

Permalink
Improve consistency of helper class init
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Aug 31, 2022
1 parent 894d555 commit 52e7ee3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/pypdfium2/_helpers/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions src/pypdfium2/_helpers/textpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 52e7ee3

Please sign in to comment.