mypy
25b210d2 - docs: clarify that invariant-by-default applies to legacy TypeVar syntax (#21108)

Commit
90 days ago
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>
Author
Parents
Loading