Skip to content

MAINT: Make HTTPXAPITarget._merge_base_and_url keyword-only - #4678

Merged
Roman Lutz (romanlutz) merged 4 commits into
microsoft:mainfrom
ilias-laoukili:maint/keyword-only-httpx-api-target
Nov 27, 2026
Merged

Roman Lutz (romanlutz) merged 4 commits into
microsoft:mainfrom
ilias-laoukili:maint/keyword-only-httpx-api-target

Conversation

@ilias-laoukili

Copy link
Copy Markdown
Contributor

Description

Relates to #4216.

Makes the private helper HTTPXAPITarget._merge_base_and_url in pyrit.prompt_target.http_target.httpx_api_target accept keyword-only arguments, clearing it from the keyword-only baseline.

  • Added * to HTTPXAPITarget._merge_base_and_url so base_url and url are keyword-only.
  • Updated its single internal caller in HTTPXAPITarget.__init__ to pass keyword arguments.
  • Added focused unit coverage for URL merging and positional-argument rejection in tests/unit/prompt_target/target/test_http_api_target.py.
  • Removed pyrit.prompt_target.http_target.httpx_api_target:HTTPXAPITarget._merge_base_and_url from build_scripts/keyword_only_baseline.txt.

Copilot AI balanced review requested due to automatic review settings November 26, 2026 18:38

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

The keyword-only enforcement is already covered by the repo-wide
check_keyword_only_params.py checker; a per-site introspection test
adds no coverage.

Co-Authored-By: Claude Fable 5 <[email protected]>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 27, 2026
Merged via the queue into microsoft:main with commit 315361f Nov 27, 2026
72 checks passed
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.

3 participants