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(