On 6/2/20 6:26 AM, Kevin Wolf wrote:
> I think I prefer the explicit Dict[str, Any] because it doesn't end up
> duplicating the default value, but I just wanted to mention that this
> option exists, too.

Oh, I see what's going on here now! Thanks, that's very helpful! In this
case, for now, I think I like your first solution, too.

Someday in the future, I want to look into strictly typed generated SDK
objects where mypy *does* know the types of every field in a QMP command
object.

That's not today, and it's probably not soon, (and it might be never,)
but until then, explicitly hinting the kwargs to be Dict[str, Any] is
reasonable enough.

Thank you so much!

--js


Reply via email to