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.
is_protocol
runtime_protocol
1 parent d388ec9 commit ab1e450Copy full SHA for ab1e450
mypy/checker.py
@@ -8022,7 +8022,7 @@ def conditional_types(
8022
return default, UninhabitedType()
8023
elif ( # handle structural subtypes
8024
isinstance(proposed_type, CallableType)
8025
- or (isinstance(proposed_type, Instance) and proposed_type.type.runtime_protocol)
+ or (isinstance(proposed_type, Instance) and proposed_type.type.is_protocol)
8026
) and is_subtype(current_type, proposed_type, ignore_promotions=True):
8027
8028
elif not is_overlapping_types(current_type, proposed_type, ignore_promotions=True):
0 commit comments