diff --git a/stubs/mysqlclient/MySQLdb/connections.pyi b/stubs/mysqlclient/MySQLdb/connections.pyi index 93bc84a1d..e3f48d2d7 100644 --- a/stubs/mysqlclient/MySQLdb/connections.pyi +++ b/stubs/mysqlclient/MySQLdb/connections.pyi @@ -1,3 +1,4 @@ +from _typeshed import Self from typing import Any from . import _mysql, cursors as cursors @@ -25,7 +26,7 @@ class Connection(_mysql.connection): encoding: str messages: Any def __init__(self, *args, **kwargs): ... - def __enter__(self): ... + def __enter__(self: Self) -> Self: ... def __exit__(self, exc_type, exc_value, traceback) -> None: ... def autocommit(self, on) -> None: ... def cursor(self, cursorclass: Any | None = ...): ...