Skip to content

Commit

Permalink
MAINT: Mark code handling old parameters as deprecated (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Apr 16, 2023
1 parent dfa95bf commit e3ee1a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pypdf/_merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def add_outline_item(
"The argument pagenum of add_outline_item is deprecated. "
"Use page_number only."
)
if pagenum is not None:
if pagenum is not None: # deprecated
old_term = "pagenum"
new_term = "page_number"
warnings.warn(
Expand All @@ -715,7 +715,7 @@ def add_outline_item(
DeprecationWarning,
)
page_number = pagenum
if page_number is None:
if page_number is None: # deprecated
raise ValueError("page_number may not be None")
writer = self.output
if writer is None:
Expand Down Expand Up @@ -811,7 +811,7 @@ def add_named_destination(
"The argument pagenum of add_named_destination is deprecated. "
"Use page_number only."
)
if pagenum is not None:
if pagenum is not None: # deprecated
old_term = "pagenum"
new_term = "page_number"
warnings.warn(
Expand All @@ -822,7 +822,7 @@ def add_named_destination(
DeprecationWarning,
)
page_number = pagenum
if page_number is None:
if page_number is None: # deprecated
raise ValueError("page_number may not be None")
dest = Destination(
TextStringObject(title),
Expand Down

0 comments on commit e3ee1a8

Please sign in to comment.