I think it should also accept float, so that type checkers won't complain on following code snippet:
import pandas as pd
pd.Timedelta(3.5, 'hours')
Argument of type "float" cannot be assigned to parameter "value" of type "str | int | Timedelta | timedelta | timedelta64" in function "__new__"
Type "float" is not assignable to type "str | int | Timedelta | timedelta | timedelta64"
"float" is not assignable to "str"
"float" is not assignable to "int"
"float" is not assignable to "Timedelta"
"float" is not assignable to "timedelta"
"float" is not assignable to "timedelta64"
Pylance[reportArgumentType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportArgumentType)
The
value
parameter ofTimedelta
currently has the following type-hint: https://github.com/pandas-dev/pandas-stubs/blob/f71224c6211ff436424be614ba47f494f64c4618/pandas-stubs/_libs/tslibs/timedeltas.pyi#L105I think it should also accept float, so that type checkers won't complain on following code snippet: