MAINT BREAKING: Rename PromptConverter to Converter#2161
Merged
Conversation
rlundeen2
approved these changes
Jul 10, 2026
rlundeen2
left a comment
Contributor
There was a problem hiding this comment.
Approved with nits on stale doc strings and things
rlundeen2
reviewed
Jul 10, 2026
rlundeen2
reviewed
Jul 10, 2026
rlundeen2
reviewed
Jul 10, 2026
rlundeen2
left a comment
Contributor
There was a problem hiding this comment.
Rich agrees with this comment but it is copilot generated: nit: one more cosmetic rename leftover I couldn't attach inline (GitHub sees converter.py as a rename so the line is unchanged context): pyrit/converter/converter.py line 96 — the __init__ docstring still says "Initialize the prompt converter." and should be "Initialize the converter." to match the rename.
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
Renames the converter base class and module namespace ahead of the 1.0 release.
PromptConverterbecomesConverterand thepyrit.prompt_converterpackage becomespyrit.converter, applied consistently across code, tests, and documentation. No backward-compatibility aliases are provided as this is a breaking change for 1.0.Changes
PromptConverter→Converter; fileprompt_converter.py→converter.py.pyrit/prompt_converter/→pyrit/converter/(moved viagit mv, history preserved).tests/unit/prompt_converter/→tests/unit/converter/.PromptConverterConfiguration→ConverterConfiguration..py/.ipynbpairs kept in sync).Intentional exceptions (not renamed)
MathPromptConverter/math_prompt_converter— "MathPrompt" is the attack technique name, not the base class.ImagePromptStyleConverter/image_prompt_style— unrelated identifier; does not contain the target token.Tests and Documentation
git grepconfirms zero remainingPromptConverter/prompt_converterreferences in committable files (excluding the intentional exceptions above).pyrit.converterexposesConverter,ConverterResult, and all members.doc/code/setup/1_configuration.ipynb, where one cacheddefault_valuesline reflects the new class name (Converter.converter_target) — matching what a live re-run produces.1_configuration.ipynbmay be outdated/broken due to removal ofSimpleInitializerand requires follow up for fix.