We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cc21d9 commit b3c4bb3Copy full SHA for b3c4bb3
1 file changed
mypy/plugins/default.py
@@ -479,8 +479,8 @@ def typed_dict_update_signature_callback(ctx: MethodSigContext) -> CallableType:
479
arg_type = get_proper_type(signature.arg_types[0])
480
if not isinstance(arg_type, TypedDictType):
481
return signature
482
- arg_type = arg_type.as_anonymous()
483
- arg_type = arg_type.copy_modified(required_keys=set())
+ anonymous_fallback = arg_type.as_anonymous().fallback
+ arg_type = ctx.type.copy_modified(fallback=anonymous_fallback, required_keys=set())
484
if ctx.args and ctx.args[0]:
485
if signature.name in _TP_DICT_MUTATING_METHODS:
486
# If we want to mutate this object in place, we need to set this flag,
0 commit comments