let's say i have a function that takes a homogeneous list and returns one of the items:
def fn[T](xs: list[T]) -> T:
return xs[0] # just as an example, actual fn is more involved
fn(['a','b','c']) # fine
fn([1,2,3]) # fine
fn([1,2,'c']) # this should error but doesn't in my editor
- is it a problem with my pyright setup?
- is there a different way i should be typing this?
python 3.12.2, pyright