File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2137,10 +2137,6 @@ def report_protocol_problems(
21372137 }
21382138 if supertype .type .fullname in exclusions .get (type (subtype ), []):
21392139 return
2140- if any (isinstance (tp , UninhabitedType ) for tp in get_proper_types (supertype .args )):
2141- # We don't want to add notes for failed inference (e.g. Iterable[Never]).
2142- # This will be only confusing a user even more.
2143- return
21442140
21452141 class_obj = False
21462142 is_module = False
@@ -2197,6 +2193,11 @@ def report_protocol_problems(
21972193 # This is an obviously wrong type: too many missing members
21982194 return
21992195
2196+ if any (isinstance (tp , UninhabitedType ) for tp in get_proper_types (supertype .args )):
2197+ # We don't want to add type conflict notes for failed inference (e.g. Iterable[Never]).
2198+ # This will be only confusing a user even more.
2199+ return
2200+
22002201 # Report member type conflicts
22012202 conflict_types = get_conflict_protocol_types (
22022203 subtype , supertype , class_obj = class_obj , options = self .options
You can’t perform that action at this time.
0 commit comments