Commit 25b210d
docs: clarify that invariant-by-default applies to legacy TypeVar syntax (#21108)
Closes #20366.
The "invariant by default" rule applies to the legacy `TypeVar` syntax.
Under PEP 695 (`class MyClass[T]: ...`), mypy infers variance from usage
instead. Updated the wording in `common_issues.rst` to make this
distinction clear.
---------
Co-authored-by: Leo Ji <nuglifeleoji@gmail.com>1 parent ef7e8a6 commit 25b210d
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
309 | 313 | | |
310 | 314 | | |
311 | 315 | | |
| |||
0 commit comments