#Typer & typing.Unpack
1 messages · Page 1 of 1 (latest)
Huh, I hadn't seen typing.Unpack before. If that works, it would indeed offer some interesting options for composing command signatures via TypedDict inheritance.
At the moment, I just have a gnarly introspection test to make sure I've used the same names everywhere I reuse a particular option definition: https://github.com/lmstudio-ai/venvstacks/blob/59c9c23cfbfca9bcef096b7cab3dfdb91ce35a71/tests/test_cli_invocation.py#L235
ah Unpack[SomeTypedDict] doesn't support defaults
and typer doesn't support it
RuntimeError: Type not yet supported: typing.Unpack[__main__.Kwargs]
FastAPI has this: https://fastapi.tiangolo.com/tutorial/query-param-models/
Which typer should probably adopt