Skip to content

MAINT: Clear pdf_converter from the keyword-only baseline - #4587

Open
SERAG AHMED (seragAhmed) wants to merge 2 commits into
microsoft:mainfrom
seragAhmed:maint/4216-pdf-converter-keyword-only
Open

SERAG AHMED (seragAhmed) wants to merge 2 commits into
microsoft:mainfrom
seragAhmed:maint/4216-pdf-converter-keyword-only

Conversation

@seragAhmed

Copy link
Copy Markdown
Contributor

Description

Relates to #4216. Removes pyrit.converter.pdf_converter from 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_async mock assertions in the unit tests are updated; the _inject_text_into_page tests already passed keywords. The two baseline entries are removed. No behaviour or public API change.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_page and _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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants