Skip to content

Commit 1dc6f2c

Browse files
committed
Some changes to as_anonymous() function in the fix
1 parent adc8eea commit 1dc6f2c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mypy/plugins/default.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,9 @@ def typed_dict_update_signature_callback(ctx: MethodSigContext) -> CallableType:
479479
arg_type = get_proper_type(signature.arg_types[0])
480480
if not isinstance(arg_type, TypedDictType):
481481
return signature
482-
anonymous_fallback = arg_type.as_anonymous().fallback
483-
arg_type = ctx.type.copy_modified(fallback=anonymous_fallback, required_keys=set())
482+
arg_type = ctx.type.copy_modified(
483+
fallback=arg_type.as_anonymous().fallback, required_keys=set()
484+
)
484485
if ctx.args and ctx.args[0]:
485486
if signature.name in _TP_DICT_MUTATING_METHODS:
486487
# If we want to mutate this object in place, we need to set this flag,

0 commit comments

Comments
 (0)