3 ms·
We should generally support TypeDicts. Can you go into more details of what is not working for you?
by sharkdp 10mo ago
We should generally support TypeDicts. Can you go into more details of what is not working for you?
- pcwelder 10mo 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 10mo agoThank you! I reported this as https://github.com/astral-sh/ty/issues/1994 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 https://github.com/astral-sh/ty/issues/86