Add __enter__/__exit__ to pymysql.Connection (#7069)

This commit is contained in:
Andrew Soutar
2022-01-28 13:57:21 -05:00
committed by GitHub
parent 390634b96b
commit 220a8d1be9

View File

@@ -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