Closed DetachHead closed 1 year ago
You are using a type annotation syntax that is not allowed by the current typing standard. If you want to work with the typing community to standardize new syntax forms, you're welcome to do so. Pyright is a standards-based type checker and follows the rules and conventions established by the Python static typing community. If you want to use pyright, you'll need to stick to the current typing standard. I've made some small accommodations for you in the past, but I really don't have patience to make additional accommodations, especially when you've shown no willingness to work with the typing community and have continued to pursue your own path.
The proper way to annotate this type using the current typing standard is tuple[int | str, int | str]
.
Describe the bug i'm using an alternate type checker (basedmypy) that supports additional features such as tuple literal types, which is why i have pylance type checking disabled. however it seems that some errors such as this one are still displayed regardless of that setting
IMO these kinds of errors should not appear when pyright type checking is disabled. see https://github.com/microsoft/pyright/issues/5451#issuecomment-1631861106:
Code or Screenshots
VS Code extension or command-line pylance v2023.10.21