Repository navigation
MAINT: Clear pdf_converter from the keyword-only baseline - #4587
Open
SERAG AHMED (seragAhmed) wants to merge 2 commits into
Open
SERAG AHMED (seragAhmed) wants to merge 2 commits into
SERAG AHMED (seragAhmed) wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The private PDF helper keyword-only migration has no active review issues.
No open issues 🎉
What changed in this PR
Advances #4216 by removing PDFConverter’s two private helpers from the keyword-only baseline, without changing PDF behavior or the public API.
Changes:
- Makes parameters after the first keyword-only in
_inject_text_into_pageand_serialize_pdf_async. - Updates callers and mock assertions to pass named arguments.
- Removes the two corresponding baseline entries.
| File | Description |
|---|---|
tests/unit/converter/test_pdf_converter.py |
Updates serialization mock assertions for keyword arguments. |
pyrit/converter/pdf_converter.py |
Migrates helper signatures and their callers. |
build_scripts/keyword_only_baseline.txt |
Removes the two migrated helper entries. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or 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
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.
Description
Relates to #4216. Removes
pyrit.converter.pdf_converterfrom the keyword-only baseline by making every parameter after the first keyword-only in its two private helpers:_inject_text_into_page(page, *, x, y, text, font, font_size, font_color)_serialize_pdf_async(pdf_bytes, *, content)Each has one caller, in the same class, and nothing subclasses
PDFConverter, overrides these methods or passes them as callbacks. The two callers and the two_serialize_pdf_asyncmock assertions in the unit tests are updated; the_inject_text_into_pagetests already passed keywords. The two baseline entries are removed. No behaviour or public API change.