py-pdf / pypdf

A pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files
https://pypdf.readthedocs.io/en/latest/
Other
7.73k stars 1.36k forks source link

STY: Within PdfWriter name CatalogDictionary consistently #2680

Closed j-t-1 closed 1 month ago

j-t-1 commented 1 month ago

CatalogDictionary is imported twice, with one of them is a rename: "from .constants import CatalogDictionary as CD". Removed this as "CD" is only used once.

j-t-1 commented 1 month ago

This slightly goes against making PdfReader and PdfWriter more consistent. Alternative is to use "CD" everywhere within PdfWriter.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.02%. Comparing base (59fdd6e) to head (3687ea8).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2680 +/- ## ========================================== - Coverage 95.02% 95.02% -0.01% ========================================== Files 50 50 Lines 8367 8366 -1 Branches 1674 1674 ========================================== - Hits 7951 7950 -1 Misses 258 258 Partials 158 158 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.