Files
openide/python/python-psi-impl/resources/inspectionDescriptions/PyVarianceInspection.html
Tatiana Ber d99b42eef2 PY-87796 UI Texts: Fix typos and grammar mistakes (Feb 2026)
(cherry picked from commit 8996fec06c52cda4d28cd5176ba1d97a7036639b)

GitOrigin-RevId: 3bc91b31ef8ecea7cd57b67c7298ed815f9a9116
2026-02-25 17:03:10 +00:00

16 lines
409 B
HTML

<html>
<body>
<p>Reports incorrect use of Python type variables due to variance issues.
</p>
<p><b>Incompatible variance</b></p>
<pre><code class="language-python">
from typing import TypeVar, Generic
T = TypeVar("T", covariant=True)
class C(Generic[T]):
def method(self, t: T): # at 'T': A covariant type variable cannot be used in this contravariant position
pass
</code></pre>
</body>
</html>