Summary
Similar to literal promotion, ty should promote (homogenous?) fixed-size tuples to arbitrary size in invariant positions. This will be especially noticeable after #1240 where ty would start emitting errors on the code sample below.
languages = {
"python": (".py", ".pyi"),
"javascript": (".js", ".jsx", ".ts", ".tsx"),
}
reveal_type(languages) # revealed: dict[Unknown | str, Unknown | tuple[str, str] | tuple[str, str, str, str]]
# expected: dict[Unknown | str, Unknown | tuple[str, ...]]
languages["ruby"] = (".rb",) # this will error when `| Unknown` is removed (see #1240)
Version
ty 0.0.13
Summary
Similar to literal promotion, ty should promote (homogenous?) fixed-size tuples to arbitrary size in invariant positions. This will be especially noticeable after #1240 where ty would start emitting errors on the code sample below.
Version
ty 0.0.13