Tuples are inferred as containing literal value types despite explicit annotation with general type
bug
```py
t1: Tuple[int, ...] = (1, 2, 3)
t2: Tuple[int, ...] = (1, 2, 4)
t1 >= t2
```
`Operator ">=" not supported for types "tuple[Literal[1], Literal[2], Literal[3]]" and "tuple[Literal[1], Literal[2], Literal[4]]"`
`Pylance language server 2026.2.1 (pyright version 1.1.408, commit 138238b4)`
This is a regression of #1170. Specifically the case mentioned in https://github.com/microsoft/pyright/issues/1170#issuecomment-727048387. @erictraut [said](https://github.com/microsoft/pyright/issues/1170#issuecomment-727212010) that he added a test case for this to the test suite, you should check that it is still there.
0 条评论