mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
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:
@@ -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 = ...): ...
|
||||
|
||||
Reference in New Issue
Block a user