Skip to content

fix: handle bare dict in transform#1721

Open
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-1628
Open

fix: handle bare dict in transform#1721
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-1628

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #1628

Return bare dict inputs unchanged in both sync and async transform paths when there is no value type to recurse into. Adds a regression test that covers both code paths.

Validation:

  • uv run pytest tests/test_transform.py -k bare_dict_annotation
  • uv run ruff check src/anthropic/_utils/_transform.py tests/test_transform.py

@nightcityblade nightcityblade requested a review from a team as a code owner June 30, 2026 15:14
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.

IndexError on bare (unparameterized) dict annotation in _transform_recursive

1 participant