Add return type to MySQLdb.Connection.__enter__ (#8381)

This pull request adds the return type, as seen in the link below, to the `mysqlclient.MySQLdb.connections:Connection.__enter__`
https://github.com/PyMySQL/mysqlclient/blob/main/MySQLdb/connections.py#L230-L231
This commit is contained in:
Kevin Kirsche
2022-07-24 07:48:47 -04:00
committed by GitHub
parent 62cde01365
commit f7166fc6ea

View File

@@ -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 = ...): ...