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
Describe the bug
I am using dict.pop(key, default) to remove an extra item from a TypedDict this results in an unexpected error, that seems wrong: I think pop misses an overload for a simple str in this case.
Pylance shows all provided keys from the TypedDict in the signature.
error: Nooverloadsfor"pop"matchtheprovidedargumentserror: Argumentoftype"Literal['poped_key']"cannotbeassignedtoparameter"k"oftype"Literal['some_present_key']"infunction"pop""Literal['poped_key']"isnotassignableto type "Literal['some_present_key']"
Describe the bug
I am using
dict.pop(key, default)
to remove an extra item from aTypedDict
this results in an unexpected error, that seems wrong: I thinkpop
misses an overload for a simplestr
in this case.Pylance shows all provided keys from the
TypedDict
in the signature.Code or Screenshots
Code sample in pyright playground
VS Code extension or command-line
pyright 1.1.393
The text was updated successfully, but these errors were encountered: