8000 Fix type check error · python/mypy@96a5b39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96a5b39

Browse files
committed
Fix type check error
1 parent 9dc2803 commit 96a5b39

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
@@ -32,7 +32,7 @@ def is_subtype(left: Type, right: Type) -> bool:
3232
or isinstance(right, ErasedType)):
3333
return True
3434
elif isinstance(right, UnionType) and not isinstance(left, UnionType):
35-
return any(is_subtype(left, item) for item in right.items)
35+
return any(is_subtype(left, item) for item in cast(UnionType, right).items)
3636
else:
3737
return left.accept(SubtypeVisitor(right))
3838

0 commit comments

Comments
 (0)
0