top | item 46298954 (no title) sharkdp | 2 months ago We should generally support TypeDicts. Can you go into more details of what is not working for you? discuss order hn newest pcwelder|2 months ago ```from anthropic.types import MessageParamdata: 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) sharkdp|2 months ago Thank you!I reported this as https://github.com/astral-sh/ty/issues/1994Support for auto-completing TypedDict keys is tracked here: https://github.com/astral-sh/ty/issues/86
pcwelder|2 months ago ```from anthropic.types import MessageParamdata: 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) sharkdp|2 months ago Thank you!I reported this as https://github.com/astral-sh/ty/issues/1994Support for auto-completing TypedDict keys is tracked here: https://github.com/astral-sh/ty/issues/86
sharkdp|2 months ago Thank you!I reported this as https://github.com/astral-sh/ty/issues/1994Support for auto-completing TypedDict keys is tracked here: https://github.com/astral-sh/ty/issues/86
pcwelder|2 months ago
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)
sharkdp|2 months ago
I reported this as https://github.com/astral-sh/ty/issues/1994
Support for auto-completing TypedDict keys is tracked here: https://github.com/astral-sh/ty/issues/86