PY-80166, PY-80167 Add warnings for covariant and contravariant types wrongly used in function type annotations

GitOrigin-RevId: 90faec6b5542659cec3aa53c2924f6837c73feda
This commit is contained in:
Daniil Kalinin
2025-06-04 12:17:47 +00:00
committed by intellij-monorepo-bot
parent 90473326ac
commit acc7655878
3 changed files with 59 additions and 0 deletions
@@ -1210,6 +1210,8 @@ INSP.type.hints.metaclass.cannot.be.generic=Metaclass cannot be generic
INSP.type.hints.unbound.type.variable=Unbound type variable
INSP.type.hints.some.type.variables.are.used.by.an.outer.scope=Some type variables ({0}) are used by an outer scope
INSP.type.hints.at.most.one.unpacked.tuple=Type argument list can have at most one unpacked TypeVarTuple or tuple
INSP.type.hints.cannot.use.covariant.in.function.param=Covariant type variable cannot be used in parameter type
INSP.type.hints.cannot.use.contravariant.in.return.type=Contravariant type variable cannot be used in function return type
QFIX.remove.function.annotations=Remove function annotations
QFIX.replace.with.target.name=Replace with the target name
QFIX.remove.generic.parameters=Remove generic parameters