Skip to content

MAINT: Type adversarial placeholder factory with Self - #3411

Open
Slai.life (huong8373tt-beep) wants to merge 1 commit into
microsoft:mainfrom
huong8373tt-beep:fix/p311-01-message-piece-adversarial-placeholder-self
Open

Slai.life (huong8373tt-beep) wants to merge 1 commit into
microsoft:mainfrom
huong8373tt-beep:fix/p311-01-message-piece-adversarial-placeholder-self

Conversation

@huong8373tt-beep

@huong8373tt-beep Slai.life (huong8373tt-beep) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • annotate MessagePiece.adversarial_placeholder with typing.Self because it constructs through cls
  • add focused subclass runtime and assert_type regression coverage

Validation

  • .venv\Scripts\python.exe -m pytest tests/unit/models/test_message_piece.py
  • .venv\Scripts\python.exe -m ruff check pyrit/models/messages/message_piece.py tests/unit/models/test_message_piece.py
  • .venv\Scripts\python.exe -m ty check pyrit/models/messages/message_piece.py tests/unit/models/test_message_piece.py
  • git -c core.whitespace=cr-at-eol diff --cached --check

Slai Agent Runtime assisted with investigation, implementation, and testing. The account owner reviewed and authorized this contribution.

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.

1 participant