Skip to content

Commit 431d722

Browse files
committed
Fix self type check
1 parent 44449cc commit 431d722

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/subtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@ def restrict_subtype_away(t: Type, s: Type) -> Type:
19271927
new_items = [
19281928
restrict_subtype_away(item, s)
19291929
for item in p_t.relevant_items()
1930-
if isinstance(item, UnionType) or not covers_type(item, s)
1930+
if isinstance(get_proper_type(item), UnionType) or not covers_type(item, s)
19311931
]
19321932
return UnionType.make_union(new_items)
19331933
elif covers_type(t, s):

0 commit comments

Comments
 (0)