You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use more precise context for invalid type argument errors (#18290)
Fixes#12274
Uses the actual invalid type argument as the error context when
possible.
Given:
```python
# flags: --pretty --show-column-number
class Foo[S, T: int]:
pass
x: Foo[str, str]
```
Before:
```
main.py:3:4: error: Type argument "str" of "Foo" must be a subtype of "int" [type-var]
x: Foo[str, str]
^
```
After:
```
main.py:3:13: error: Type argument "str" of "Foo" must be a subtype of "int" [type-var]
x: Foo[str, str]
^
```
0 commit comments