-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STY: Refactor _xobj_to_image #2863
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f04ae4a
to
eeef7cc
Compare
* Create _apply_decode and move it to _xobj_image_helpers * Create _get_mode_and_invert_color and move it to _xobj_image_helpers * Create _apply_alpha as an inner function as it's calling _xobj_to_image This reduced the Cyclomatic Complexity from 44 to 19
eeef7cc
to
babcc07
Compare
e885dfa
to
420f3b1
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
pubpub-zz
approved these changes
Sep 22, 2024
pubpub-zz
added a commit
to pubpub-zz/pypdf
that referenced
this pull request
Sep 29, 2024
## Version 5.0.1, 2024-09-29 ### New Features (ENH) - Add `full` parameter to PdfWriter constructor (py-pdf#2865) ### Bug Fixes (BUG) - Update pyproject.toml with minimum Python version of 3.8 (py-pdf#2859) - Cope with unbalanced delimiters in dictionary object (py-pdf#2878) - Cope with encoding with too many differences (py-pdf#2873) - Missing spaces in extract_text() method (py-pdf#1328) (py-pdf#2868) - Tolerate truncated files and no warning when jumping startxref (py-pdf#2855) ### Robustness (ROB) - Repair PDF with invalid Root object (py-pdf#2880) - Continue parsing dictionary object when error is detected (py-pdf#2872) - Merge documents with invalid pages in named destinations (py-pdf#2857) - Tolerate comments(%) in arrays (py-pdf#2856) ### Documentation (DOC), Testing (TST), Code Style (STY), Developer Experience (DEV), Maintenance (MAINT) - (py-pdf#2844), (py-pdf#2862), (py-pdf#2863), (py-pdf#2847), (py-pdf#2860), (py-pdf#2867), (py-pdf#2874), (py-pdf#2879) [Full Changelog](py-pdf/pypdf@5.0.0...5.0.1)
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reduced the Cyclomatic Complexity from 44 to 19