From 8bad5f6209850373cc76afa8ca1b13e916470de6 Mon Sep 17 00:00:00 2001 From: "Kai (Kazuya Ito)" Date: Thu, 4 Dec 2025 06:16:29 +0900 Subject: [PATCH] Update message_registry.py --- mypy/message_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/message_registry.py b/mypy/message_registry.py index b0f9ed1b0dfe..609ecb2622fa 100644 --- a/mypy/message_registry.py +++ b/mypy/message_registry.py @@ -114,7 +114,7 @@ def with_additional_msg(self, info: str) -> ErrorMessage: "Cannot use a contravariant type variable as return type" ) FUNCTION_PARAMETER_CANNOT_BE_COVARIANT: Final = ErrorMessage( - "Cannot use a covariant type variable as a parameter" + "Cannot use a covariant type variable as a parameter except for __init__, __new__, and instance method's self" ) INCOMPATIBLE_IMPORT_OF: Final = ErrorMessage('Incompatible import of "{}"', code=codes.ASSIGNMENT) FUNCTION_TYPE_EXPECTED: Final = ErrorMessage(