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.
join_type_list
1 parent 4a427e9 commit e10b559Copy full SHA for e10b559
mypy/join.py
@@ -885,8 +885,9 @@ def join_type_list(types: Sequence[Type]) -> Type:
885
# with all variable length tuples, and this makes it possible.
886
return UninhabitedType()
887
joined = types[0]
888
- for t in types[1:]:
889
- joined = join_types(joined, t)
+ for i, t in enumerate(types[1:], 1):
+ if t not in types[:i]:
890
+ joined = join_types(joined, t)
891
return joined
892
893
0 commit comments