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 44449cc commit 431d722Copy full SHA for 431d722
mypy/subtypes.py
@@ -1927,7 +1927,7 @@ def restrict_subtype_away(t: Type, s: Type) -> Type:
1927
new_items = [
1928
restrict_subtype_away(item, s)
1929
for item in p_t.relevant_items()
1930
- if isinstance(item, UnionType) or not covers_type(item, s)
+ if isinstance(get_proper_type(item), UnionType) or not covers_type(item, s)
1931
]
1932
return UnionType.make_union(new_items)
1933
elif covers_type(t, s):
0 commit comments