logoalt Hacker News

sharkdpyesterday at 6:44 AM1 replyview on HN

We should generally support TypeDicts. Can you go into more details of what is not working for you?


Replies

pcwelderyesterday at 8:36 AM

```

from anthropic.types import MessageParam

data: list[MessageParam] = [{"role": "user", "content": [{"type": "text", "text": ""}]}]

```

This for example works both in mypy and pyright. (Also autocompletion of typedict keys / literals from pylance is missing)

show 1 reply