Pyright error when using TypeVarTuple

Hello,

Pyright shows errors with the following code using TypeVarTuple. How can I fix it?

from typing import TypeVarTuple

Ts = TypeVarTuple("Ts")

def f(arg: tuple[*Ts]) -> tuple[int, *Ts]:
    ret = (1,) + arg
    return ret

x:tuple[int, str] = (1, 'a')
value = f(x)

Errors:

$ pyright --version
pyright 1.1.327

$ pyright test.py
/Users/inoue/test.py
  /Users/inoue/test.py:7:12 - error: Expression of type "tuple[Union[*Ts@f] | Literal[1], ...]" cannot be assigned to return type "tuple[int, *Ts@f]"
    "tuple[Union[*Ts@f] | Literal[1], ...]" is incompatible with "tuple[int, *Ts@f]"
      Tuple entry 1 is incorrect type
        Type "object | Literal[1]" cannot be assigned to type "int"
          "object" is incompatible with "int" (reportGeneralTypeIssues)
1 error, 0 warnings, 0 informations

The __add__ method for tuple doesn’t preserve the TypeVarTuple. If you use a tuple expression instead, you can eliminate the type error.

def f(arg: tuple[*Ts]) -> tuple[int, *Ts]:
    ret = (1, *arg)
    return ret

It works!
Thank you!