Skip to content

MAINT: Use 'page_number' instead of 'pagenum'#1365

Merged
MartinThoma merged 7 commits intomainfrom
consistency
Dec 4, 2022
Merged

MAINT: Use 'page_number' instead of 'pagenum'#1365
MartinThoma merged 7 commits intomainfrom
consistency

Conversation

@MartinThoma
Copy link
Copy Markdown
Member

@MartinThoma MartinThoma commented Sep 24, 2022

This PR ensures PyPDF2 uses page_number instead of pagenum as a parameter name.

  • It does not touch functions that are deprecated anyway.
  • The position of the new parameter is the same as the old one
  • The old parameter name is added to ensure that people who use the keyword-parameter don't have a breaking change.

Credits to @mtd91429 who pointed out those inconsistencies in #1187

@MartinThoma MartinThoma added the is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements label Sep 24, 2022
@MartinThoma MartinThoma marked this pull request as draft September 24, 2022 14:10
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 24, 2022

Codecov Report

Base: 94.43% // Head: 93.73% // Decreases project coverage by -0.70% ⚠️

Coverage data is based on head (b0b90f7) compared to base (3e250c5).
Patch coverage: 20.40% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1365      +/-   ##
==========================================
- Coverage   94.43%   93.73%   -0.71%     
==========================================
  Files          28       28              
  Lines        5194     5235      +41     
  Branches      984      997      +13     
==========================================
+ Hits         4905     4907       +2     
- Misses        173      199      +26     
- Partials      116      129      +13     
Impacted Files Coverage Δ
PyPDF2/_reader.py 90.30% <ø> (ø)
PyPDF2/_merger.py 91.11% <10.00%> (-6.50%) ⬇️
PyPDF2/_writer.py 88.73% <27.58%> (-2.92%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MartinThoma MartinThoma marked this pull request as ready for review November 20, 2022 08:41
@MartinThoma
Copy link
Copy Markdown
Member Author

@mtd91429 What do you think about this PR?

@MartinThoma MartinThoma merged commit deb0667 into main Dec 4, 2022
@MartinThoma MartinThoma deleted the consistency branch December 4, 2022 16:02
MartinThoma added a commit that referenced this pull request Dec 10, 2022
New Features (ENH):
-  Add support to extract gray scale images (#1460)
-  Add 'threads' property to PdfWriter (#1458)
-  Add 'open_destination' property to PdfWriter (#1431)
-  Make PdfReader.get_object accept integer arguments (#1459)

Bug Fixes (BUG):
-  Scale PDF annotations (#1479)

Robustness (ROB):
-  Padding issue with AES encryption (#1469)
-  Accept empty object as null objects (#1477)

Documentation (DOC):
-  Add module documentation the PaperSize class (#1447)

Maintenance (MAINT):
-  Use 'page_number' instead of 'pagenum' (#1365)
-  Add List of pages to PageRangeSpec (#1456)

Testing (TST):
-  Cleanup temporary files (#1454)
-  Mark test_tounicode_is_identity as external (#1449)
-  Use Ubuntu 20.04 for running CI test suite (#1452)

[Full Changelog](2.11.2...2.12.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant