Skip to content

Commit 0649efe

Browse files
committed
Play a bit more while we are here
1 parent d72d98d commit 0649efe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mypy/checker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4740,7 +4740,8 @@ def infer_rvalue_with_fallback_context(
47404740
and is_valid_inferred_type(alt_rvalue_type, self.options)
47414741
and (
47424742
# For redefinition fallbacks we are fine getting not a subtype.
4743-
inferred is not None
4743+
redefinition_fallback
4744+
or argument_redefinition_fallback
47444745
# Skip Any type, since it is special cased in binder.
47454746
or not isinstance(get_proper_type(alt_rvalue_type), AnyType)
47464747
and is_proper_subtype(alt_rvalue_type, rvalue_type)

0 commit comments

Comments
 (0)