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 d72d98d commit 0649efeCopy full SHA for 0649efe
1 file changed
mypy/checker.py
@@ -4740,7 +4740,8 @@ def infer_rvalue_with_fallback_context(
4740
and is_valid_inferred_type(alt_rvalue_type, self.options)
4741
and (
4742
# For redefinition fallbacks we are fine getting not a subtype.
4743
- inferred is not None
+ redefinition_fallback
4744
+ or argument_redefinition_fallback
4745
# Skip Any type, since it is special cased in binder.
4746
or not isinstance(get_proper_type(alt_rvalue_type), AnyType)
4747
and is_proper_subtype(alt_rvalue_type, rvalue_type)
0 commit comments