Repository navigation
MAINT: Keyword-only helpers - #4210
Merged
Roman Lutz (romanlutz) merged 3 commits intoNov 11, 2026
Merged
Roman Lutz (romanlutz) merged 3 commits into
Roman Lutz (romanlutz) merged 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the private-helper keyword-only migration.
No open issues 🎉
What changed in this PR
This PR migrates two private helpers to PyRIT’s keyword-only convention, following up on #3960 without changing public APIs or helper behavior.
Changes:
- Require
max_length=andkey=in the helpers and update their callers. - Add regression tests for keyword-only parameters, truncation boundaries, and metadata filtering.
- Remove the two migrated helpers from the legacy baseline.
| File | Description |
|---|---|
tests/unit/registry/test_registry.py |
Tests keyword-only enforcement, attribute precedence, and parameter-based filters. |
tests/unit/cli/test_output.py |
Tests truncation boundaries and keyword-only enforcement. |
pyrit/registry/registry.py |
Makes key keyword-only and updates filter callers. |
pyrit/cli/_output.py |
Makes max_length keyword-only and updates output callers. |
build_scripts/keyword_only_baseline.txt |
Removes the two migrated helper entries. |
Review effort: Balanced
jbolor21
approved these changes
Nov 11, 2026
Roman Lutz (romanlutz)
deleted the
romanlutz-private-helper-keyword-only-cleanup
branch
November 11, 2026 20:03
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
Make two private helpers follow PyRIT's keyword-only convention without changing truncation or metadata-filter behavior. This is the small cleanup identified during #3960.
max_length=in_truncate_textandkey=in_get_metadata_value, updating every caller.Public APIs are unchanged.