diff --git a/stubs/PyMySQL/pymysql/connections.pyi b/stubs/PyMySQL/pymysql/connections.pyi index 2ec680f83..2b2b49d0a 100644 --- a/stubs/PyMySQL/pymysql/connections.pyi +++ b/stubs/PyMySQL/pymysql/connections.pyi @@ -1,3 +1,4 @@ +from _typeshed import Self from socket import socket as _socket from typing import Any, AnyStr, Generic, Mapping, TypeVar, overload @@ -195,6 +196,8 @@ class Connection(Generic[_C]): def get_proto_info(self): ... def get_server_info(self): ... def show_warnings(self): ... + def __enter__(self: Self) -> Self: ... + def __exit__(self, *exc_info: object) -> None: ... Warning: Any Error: Any InterfaceError: Any