You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In stubs, __init__ has 5 overloads and update() has 3 overloads. But at runtime, dict.update() accepts everything that dict.__init__ accepts. For example:
Allow **kwargs to update() only if the key type is str. I haven't tried this yet and it may run into tricky variance issues. (What if the key type is a Literal over particular strings?)
typeshed/stdlib/builtins.pyi
Lines 807 to 818 in 196f69b
typeshed/stdlib/builtins.pyi
Lines 824 to 829 in 196f69b
In stubs,
__init__
has 5 overloads andupdate()
has 3 overloads. But at runtime,dict.update()
accepts everything thatdict.__init__
accepts. For example:The text was updated successfully, but these errors were encountered: