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
8.41k stars 1.42k forks source link

STY: Refactor _xobj_to_image #2863

Closed MartinThoma closed 2 months ago

MartinThoma commented 2 months ago

This reduced the Cyclomatic Complexity from 44 to 19

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 96.15385% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.00%. Comparing base (966e015) to head (420f3b1). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pypdf/filters.py 91.30% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2863 +/- ## ======================================= Coverage 96.00% 96.00% ======================================= Files 51 51 Lines 8528 8539 +11 Branches 1699 1700 +1 ======================================= + Hits 8187 8198 +11 Misses 200 200 Partials 141 141 ```

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